[Tutor] Division doesn't work
Johan Geldenhuys
johan at accesstel.co.za
Thu Jan 18 12:37:57 CET 2007
Hi all,
In my script I want to convert 14105 bytes to kilobytes and and this is what
I do:
>>> s = 14105
>>> print '%0.2f' % (s/1024)
13.00
This not correct and I don't know why. The answer is 13.77.
Any pointers please that would help my in the right direction?
Thanks
Johan
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.13/632 - Release Date: 2007/01/16
04:36 PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070118/426944f4/attachment.htm
More information about the Tutor
mailing list