-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleTimer.py
55 lines (45 loc) · 1.21 KB
/
SimpleTimer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Step 1
import time
import winsound
from time import sleep
# Step 2
def sleep_days(days):
sleep(days * 86400)
def sleep_weeks(weeks):
sleep(weeks * 604800)
def sleep_years(years):
sleep(years * 31536000)
def sleep_months(months):
sleep(months * 2628000)
def sleep_minutes(minutes):
sleep(minutes * 60)
def sleep_hours(hours):
sleep(hours * 3600)
# Step 3
a = int(input("Enter how many times I have beep when i'm done > "))
b = int(input("Enter when to beep (in Years) > "))
c = int(input("Enter when to beep (in Months) > "))
d = int(input("Enter when to beep (in Weeks) > "))
e = int(input("Enter when to beep (in Days) > "))
f = int(input("Enter when to beep (in Hours) > "))
g = int(input("Enter when to beep (in Minutes) > "))
h = int(input("Enter when to beep (in Seconds) > "))
# Step 4
sleep_years(b)
sleep_months(c)
sleep_weeks(d)
sleep_days(e)
sleep_hours(f)
sleep_minutes(g)
time.sleep(h)
# Step 5
for i in range(a):
winsound.Beep(3000,100)
winsound.Beep(2500,100)
winsound.Beep(2000,100)
winsound.Beep(1000,100)
winsound.Beep(500,100)
winsound.Beep(2000,100)
winsound.Beep(800, 90)
# Step 6
print('DONE')