Created
March 3, 2024 05:21
-
-
Save RichardScottOZ/8495dd4267a8f5deaa0e591f7165f495 to your computer and use it in GitHub Desktop.
Timer Noise Fozzie version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from IPython.display import Audio, display | |
def allDone(): | |
display(Audio(url='http://blogfiles.wfmu.org/SW/waka_waka.mp3', autoplay=True)) | |
allDone() | |
def countdown(t): | |
while t: | |
mins, secs = divmod(t, 60) | |
hours, mins = divmod(mins, 60) # divide number of minutes by 60 to get hours | |
days, hours = divmod(hours, 24) # divide number of hours by 24 to get days | |
timer = '{:02d}:{:02d}:{:02d}:{:02d}'.format(days, hours, mins, secs) | |
print(timer, end="\r") | |
time.sleep(1) | |
t -= 1 | |
print('Exploracorn!!') | |
t = 10 | |
countdown(int(t)) | |
allDone() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment