| 1 | initial version |
I find that the easiest way to to convert to a python floating point before printing.
float(24/5) #-> 4.8
"%.4f" % float(26/3) #-> 8.6667
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.