Apr-11-2019, 06:38 AM
Hello guys, i am trying to create a programm with tkinter (for first time) and i got the follow error in one part of my code:
If i use float instead of eval i get another error "ValueError: could not convert string to float:"
Is there anyone who can help me?
y = StringVar() z = StringVar() 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 = str(y.get()) z = str(z.get()) y1=eval(y) z1=eval(z)When i run this loop i get the error "SyntaxError: unexpected EOF while parsing".
If i use float instead of eval i get another error "ValueError: could not convert string to float:"
Is there anyone who can help me?