# import the time module import time # define the countdown func. 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('Happy Chinese New Year!') # input time in seconds t = input("Enter the time in seconds: ") # function call countdown(int(t))
top of page
Thanks for submitting!

Maui Fire Relief

If you or a family member has been affected by the fires in Maui, and require assistance; please leave your contact information and someone will be in touch.

bottom of page