Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from time import sleep
- def countdown(t):
- print("counting down")
- while t > 0:
- t2 = t
- dayz = t2 // (24 * 3600)
- t2 = t2 % (24 * 3600)
- hourz = t2 // 3600
- t2 %= 3600
- minutez = t2 // 60
- secondz = t2 % 60
- print("d:h:m:s-> %d:%d:%d:%d" % (dayz, hourz, minutez, secondz))
- sleep(1)
- t = t -1
- tgttimer = float(input("enter timer in seconds: ") )
- countdown(tgttimer)
- print("Times Up!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement