Assuming I have three line of python code
text = "0.965"
value = float(text)
print value
My question is, when they display the output, why my python show 0.9649999999999999
instead if 0.965
. I know I can use round to get rid of this problem, but I just wondering why this is the case? I though I should just get the 0.965
?
Thanks for you answering.