Help with some python homework...

David Hutto dwightdhutto at gmail.com
Mon Feb 3 02:12:32 CET 2014


On Saturday, February 1, 2014 2:32:22 PM UTC-5, Denis McMahon wrote:
> On Fri, 31 Jan 2014 18:14:31 -0700, Scott W Dunning wrote:
> 
> 
> 
> > little different from a few things you guys had mentioned.  For one, I
> 
> > got the correct time by calculating the number of time run and
> 
> > converting that into seconds then back out to hr:mn:sc.  I didn't
> 
> > calculate from midnight.
> 
> 
> 
> > SECONDS = 1 MINUTES = 60 * SECONDS HOURS = 60 * MINUTES
> 
> > 
> 
> > time_left_house = 6 * HOURS + 52 * MINUTES
> 
> 
> 
> This does actually calculate the time in seconds since midnight that you 
> 
> left the house
> 
> 
> 
> > miles_run_easy_pace = 2 * (8 * MINUTES + 15 * SECONDS)
> 
> > 
> 
> > miles_run_fast_pace = 3 * (7 * MINUTES + 12 * SECONDS)
> 
> > 
> 
> > time_returned_home = miles_run_easy_pace + miles_run_fast_pace +
> 
> > time_left_house
> 
> 
> 
> And this calculates the time in seconds since midnight that you returned 
> 
> home
> 
> 
> 
> So although you don't realise it, you are actually working in seconds 
> 
> since midnight, and then converting seconds back into hours, minutes and 
> 
> seconds.
> 
> 
> 
> -- 
> 
> Denis McMahon


A little OT, but these might peak your interest for this:

http://en.wikipedia.org/wiki/Epoch_%28reference_date%29
http://en.wikipedia.org/wiki/Leap_second



More information about the Python-list mailing list