Using Python 3.6 and tkinter that comes with it.
My tkinter code:
o 0.2
o 0.30000000000000004
o 0.4
o 0.5
o 0.60000000000000001
o 0.70000000000000001
o 0.8
o 0.9
o 1.0
Why does Python 3.6 erroneously calculate the .3, .6 and .7 values?
And more importantly, what's the simplest way to limit the output to one decimal place using my code?
My tkinter code:
for myvalue in range(2,11): Radiobutton(rightFrame, text=myvalue*.1, font=(None, 14), variable=var, value=myvalue).pack()Produces radio buttons with the following values:
o 0.2
o 0.30000000000000004
o 0.4
o 0.5
o 0.60000000000000001
o 0.70000000000000001
o 0.8
o 0.9
o 1.0
Why does Python 3.6 erroneously calculate the .3, .6 and .7 values?
And more importantly, what's the simplest way to limit the output to one decimal place using my code?