title: clock countdown calculation in python
body: <p>I want to write a function called <code>boom(h,m,s)</code> that after input from main starts printing in <strong>HH:MM:SS</strong> format the countdown clock, and then prints "boom".<br>
  I'm not allowed to use existing modules except the time.sleep(), so I have to base on While\For loops.</p>
  
  <pre><code>import time
  
  def boom(h,m,s):
      while h&gt;0:
          while m&gt;0:
              while s&gt;0:
                  print ("%d:%d:%d"%(h,m,s))
                  time.sleep(1)
                  s-=1
              print ("%d:%d:%d"%(h,m,s))
              time.sleep(1)
              s=59
              m-=1
          print ("%d:%d:%d"%(h,m,s))
          time.sleep(1)
          s=59
          m=59
          h-=1
      while h==0:
          while m==0:
              while s&gt;0:
                  print ("%d:%d:%d"%(h,m,s))
                  time.sleep(1)
                  s-=1
      print ("BooM!!")
  </code></pre>
  
  <p>I figured how to calculate the seconds part, but when I input zeros on H and M parameters, it's messing with the clock.</p>