[sf-lug] [PYCLASS] Still on exercise 2.1

Christian Einfeldt einfeldt at gmail.com
Fri Oct 3 21:32:24 PDT 2008


Oh no!  The hamster tripped and fell off its wheel!  Can you help the
hamster get back on?  here is the problem that tripped the hamster.  Now I
will preface this question by saying that I was a poli sci major for
undergrad, and I worked very hard to get a D in Algebra 2, so with that in
mind, here we go:

If I leave my house at 6:52 am and run 1 mile at an easy pace (*:15 per
mile), then 3 miles at tempo (7:12) per mile) and 1 mile at easy pace again,
what time do I get home for breakfast?

I was able to get the total time of his run, at 38.10 minutes, expressed as
follows,

>>> (2.0*8.25)+(3*7.20)
38.100000000000001

But I was not able to figure out how to use Python to add the time of his
jogging to the clock hours.  I did notice that 52 and 60 are both evenly
divisible by 4, but that didn't help me.  The problem for me here is
converting 60 minute hour.  If his run time had been only 6 minutes, I could
have fudged it by doing

>>> 6.52+.06
6.5799999999999992

but that is still not clean for the obvious reasons.  Any suggestions?  Thx.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20081003/83af078f/attachment.html>


More information about the sf-lug mailing list