How is Tkinter multiplying the user on the number with the floating point?
-
In any attempt in Tkinter, multiplying the user ' s numbers on the assigned number of melting points makes a mistake. When identifying the type float(TypeError: float() argument must be a string or a number, not 'NoneType'), and if int - ValueError: invalid literal for int() with base 10: '0.0'.
num1 = float(a.get()) num2 = float(b.get()) num2 = b.set(num1*785.9) num1 = a.set(num2*456.7)
The value of the first field in the second entry should be multiplied by example and vice versa.
-
Take away the assignment when you do
.set(...)
♪b.set(num1*785.9) a.set(num2*456.7)
These functions do not return anything (i.e., in fact, returning
None
) And that's what you're wiping the variables.num1
andnum2
♪