Skip to content

Commit

Permalink
fix 01 june bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Okmeque1 authored Jun 9, 2024
1 parent 7a4403f commit 973ddd2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions PythonSoft/Utilities/alarm clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ def almclock(alarm):
clearscreen()
alarm += input("Enter a day. The format must be the first 3 letters of the day with the first letter a capitalized : ") + " "
alarm += input("Enter a month. The format must be the first 3 letters of the month with the first letter capitalized : ") + " "
alarm += input("Enter a day from 01 to 30 or 31 depending on the month. The format must be with 2 digits. If the day is 0-9, you must type 09, 04, 01 and the rest you type it normally : ") + " "
fixbug = input("Enter a day from 01 to 30 or 31 depending on the month. The format must be with 2 digits. If the day is 0-9, you must type 09, 04, 01 and the rest you type it normally : ") + " "
if fixbug[0] == '0':
fixbug = ' ' + fixbug[1] + " "
alarm += fixbug
alarm += input("Enter an hour from 00 to 23. The format must be with 2 digits. If the hour is 00-09, you must type 00, 04, 09 and the rest you type it normally : ") + ":"
alarm += input("Enter a minute from 00-59. The format must be with 2 digits. If the minute is 00-09, you must type it 00, 04, 09 and the rest you type it normally : ") + ":"
alarm += input("Enter a second. Same rules as the minutes. If you don't know what that is then you can't read : ") + " "
alarm += input("Enter a year : ")
clearscreen()
almclock(alarm)
clearscreen()
end()
def clearscreen():
if os.name == 'nt':
Expand All @@ -32,6 +35,4 @@ def end():
while True:
winsound.Beep(440,250)
time.sleep(0.25)
else:
os.system('play -nq -t alsa synth 0.1 sine 440')
almclock("")

0 comments on commit 973ddd2

Please sign in to comment.