# Help with some python homework...

Denis McMahon denismfmcmahon at gmail.com
Sat Feb 1 20:32:22 CET 2014

```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, denismfmcmahon at gmail.com

```