Print a float value

Hailiang Shen
 

Hello all, could anyone help me understand printing float values? E.g.

 

print (7.0/3) will output 2.33333333333

print (7/3.0, 7.0/3) will output (2.3333333333333335, 2.3333333333333335)

 

I am not sure why the outputs are slightly different.

 

Regards,

 

Hailiang

 

Join users@ironpython.groups.io to automatically receive all group messages.