Advertisement
Mori007

TimerNotGuii

Feb 13th, 2021
720
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from time import sleep
  2.  
  3. # Function Convert to minutes:seconds
  4. def timeku(seconds):
  5.     min, sec = divmod(seconds, 60)
  6.     return "%02d:%02d" % (min, sec)
  7.  
  8. Function count down
  9. def countdown(t):
  10.     while t > 0:
  11.         print(timeku(t))
  12.         t -= 1
  13.         sleep(1)
  14.  
  15.     if t == 0:
  16.         print("Game Over Broo")
  17.  
  18. countdown(120)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement