title: (Python) Using modulo to get the remainder from changing secs, to hrs and minutes
body: <p>I'm currently new to learning python and stumbled upon this problem: </p>
  
  <blockquote>
    <p>Exercise 2-7 Get the Time
    Write an algorithm that reads the amount of time in seconds and then displays the equivalent
    hours, minutes and remaining seconds.
    • One hour corresponds to 60 minutes.
    • One minute corresponds to 60 seconds.</p>
  </blockquote>
  
  <p>Here's how I wrote it:</p>
  
  <pre><code>def amount_time(t):
    h = t//3600
    m = int((t/3600 - h)*60)
    s = int(((t/3600 - h)*60 - m)*60)
    print("Number of hours:",h)
    print("Number of minutes:",m)
    print("Number of Seconds:", s)
  amount_time(5000)
  </code></pre>
  
  <p>I was told there was an easier way to write it using modulo to get the remainder for the minutes and seconds, could someone help? Thanks!</p>