use python as a calculator

Ian Kelly ian.g.kelly at gmail.com
Thu Jun 24 13:17:52 EDT 2010


On Thu, Jun 24, 2010 at 10:33 AM, ilovesss2004 <yyiilluuoo at gmail.com> wrote:
> I use python 2.5
> Must change version? Is there any other solution?

It works for me:

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1.0/10**10
1e-010

Perhaps you're doing integer division by mistake?

>>> 1/10**10
0L

Cheers,
Ian



More information about the Python-list mailing list