CalebPaste123

timer

Apr 30th, 2022
1,082
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. import time
  2. hours = int(input("how many hours? "))
  3. minutes = int(input("how many minutes? "))
  4. seconds = int(input("how many seconds? "))
  5. while hours > 0 or minutes > 0 or seconds > 0:
  6.     print(hours, ":", minutes, ":", seconds)
  7.     time.sleep(1)
  8.     if seconds == 0:
  9.         seconds = 60
  10.         minutes -= 1
  11.     if minutes == -1:
  12.         minutes = 59
  13.         hours -= 1
  14.     seconds -= 1
  15. while 0 == 0:
  16.     print("TIMER DONE")
  17.  
Advertisement
Add Comment
Please, Sign In to add comment