[Tutor] Floating point exercise 3 from Learn python the hard way

amt 0101amt at gmail.com
Mon Jun 13 20:34:44 CEST 2011


Hello, my version is Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39). The
book only talks about Python 2.x.

So, how do I solve the exercise?

3. print "Roosters", 100 - 25 * 3 % 4.00
5. print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4.00 + 6

Is this correct? I'm a bit confused at line 5 because python returns 6,75
and wolfram alpha tells me the result of that expression is 6,83.

Sorry, my math is VERY rusty.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110613/5d5e2107/attachment.html>


More information about the Tutor mailing list