[BangPypers] strange behavior

Gopal Ghosh gopalmessages at gmail.com
Thu Jul 10 06:54:15 CEST 2008


Dear sir / madam
I am a new user of python and this is my first mail to local user group of
python. I came across a strange behavior pf python n unable to explain it


*********************
>>> 7/3
2
>>> 7/-3
-3
>>> 3/7
0
>>> # again reapting the questions with one more decimal place
>>> 7.0/3
2.3333333333333335
>>> 7.0/-3
-2.3333333333333335
>>> 3.0/7
0.42857142857142855
>>> # why it is not showing the exact values in the previous cases
>>>
********************************
ur help will strengthen my love for python
Thanks
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20080710/bef47e1e/attachment.htm>


More information about the BangPypers mailing list