<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br><br></div>The conversion to seconds is simple -- there are 60 seconds in a
<br>minute, and 60*60=3600 seconds in an hour. So you just multiply it<br>out, and divide by the distance to get the pace.<br><br>The conversion back to minutes and seconds is maybe a bit trickier.<br>If you divide the total seconds by 60, you get minutes. But we don't
<br>care about the fractional part, so I used int() to trim it off. The<br>number of seconds in that minute is the remainder when we divide the<br>total seconds by 60. That's what the % operator does. (For some<br>
reason people always seem to forget about the % operator. It's very<br>useful.)<br><br>The formatting is simple with printf. %02d formats the argument as a<br>2-digit number with leading 0's.<br><br>Hope this helps.
<br><font color="#888888"></font></blockquote><div><br>Yes. the modulus is what I was missing and what led me down the path of external modules. <br><br>Thanks guys!<br><br>Ted<br> </div>-- <br></div>If you mess with a thing long enough, it'll break.
<br> -- Schmidt