Nov-25-2023, 10:09 PM
Hey I'm learning python now and was just learning formatting in my online class. When I ran the following code I got the following output. I thought 2/3 was always .666 repeating. Is this not the case? or can someone explain the output to me.
Code:
print("{0:1.54}".format(2/3))
Output:
0.66666666666666662965923251249478198587894439697265625
Code:
print("{0:1.54}".format(2/3))
Output:
0.66666666666666662965923251249478198587894439697265625