Initial upload

This commit is contained in:
Mueez Khan 2021-03-25 08:58:09 -04:00 committed by GitHub
commit bf8a8f965d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 0 deletions

14
countdown.py Normal file
View file

@ -0,0 +1,14 @@
import time
def countdown(t):
while t:
mins, secs, = divmod(t, 60)
timer = '{:02d}:{:02d}'.format(mins, secs)
print(timer, end="\r")
time.sleep(1)
t -= 1
print('Countdown complete!')
t = input("Enter the time in seconds: ")
countdown(int(t))