Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Adding break in alarm #589

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions projects/Alarm clock/alarm_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def Threading():
t1=Thread(target=alarm)
t1.start()


def alarm():
# Infinite Loop
while True:
Expand All @@ -34,6 +35,7 @@ def alarm():
print("Time to Wake up")
# Playing sound
winsound.PlaySound("sound.wav",winsound.SND_ASYNC)
break

# Add Labels, Frame, Button, Optionmenus
Label(root,text="Alarm Clock",font=("Helvetica 20 bold"),fg="red").pack(pady=10)
Expand Down Expand Up @@ -82,5 +84,6 @@ def alarm():

Button(root,text="Set Alarm",font=("Helvetica 15"),command=Threading).pack(pady=20)


# Execute Tkinter
root.mainloop()