<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. &nbsp;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. &nbsp;But we don&#39;t
<br>care about the fractional part, so I used int() to trim it off. &nbsp;The<br>number of seconds in that minute is the remainder when we divide the<br>total seconds by 60. &nbsp;That&#39;s what the % operator does. &nbsp;(For some<br>
reason people always seem to forget about the % operator. &nbsp;It&#39;s very<br>useful.)<br><br>The formatting is simple with printf. &nbsp;%02d formats the argument as a<br>2-digit number with leading 0&#39;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>&nbsp;</div>-- <br></div>If you mess with a thing long enough, it&#39;ll break.
<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- Schmidt