Apr-11-2019, 07:07 AM
First of all, thank you very match for your quick reply.
I used eval because i want to do some math after this and actually i didn't know about DoubleVar, as i said im new in tkinter.
Now i have a new problem.
k = ((z-x)/z)*100
ZeroDivisionError: float division by zero
And the problem is that the error pops up before entering any data, just running the script.
And i also use python 3.6 :D
I used eval because i want to do some math after this and actually i didn't know about DoubleVar, as i said im new in tkinter.
Now i have a new problem.
y = DoubleVar() z = DoubleVar() entry_1 = Entry(root, textvariable=y) entry_1.grid(row=0, column=1) entry_2 = Entry(root, textvariable=z) entry_2.grid(row=1, column=1) y = (y.get()) z = (z.get()) x = z / (y + 1) m = z - x k = ((z-x)/z)*100i adjusted the code and now i got this error:
k = ((z-x)/z)*100
ZeroDivisionError: float division by zero
And the problem is that the error pops up before entering any data, just running the script.
And i also use python 3.6 :D