-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
93 lines (71 loc) · 2.39 KB
/
main.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
from pygame import mixer
import pygame
import time
def getdate():
import datetime
return datetime.datetime.now()
time_1 = getdate()
def water():
print("Clock has Started!!")
# i = 3600
i = 1
while(i <= 3600): #1 hour
print(i)
time.sleep(1)
if(i == 1800): #30 minutes
# time.sleep(1800)
pygame.init()
pygame.mixer.init()
sounda= pygame.mixer.Sound("eyes.mp3")
sounda.play()
user = input("Write 'done' if done ! : ")
user = user.lower()
if(user == 'done'):
print("DO EYE EXERCISE !!!")
with open("logs.txt","a") as f:
f.write(f"[{time_1}] : i did the eye exercise\n")
pygame.mixer.pause()
else:
pass
# n = 2700
if(i == 2700): # 45 minutes
pygame.init()
pygame.mixer.init()
sounda= pygame.mixer.Sound("exercise.mp3")
sounda.play()
user = input("Write 'done' if done ! : ")
user = user.lower()
if(user == 'done'):
print("DO PHYSICAL EXERCISE !!!")
with open("logs.txt","a") as f:
f.write(f"[{time_1}] : i did the physical exercise\n")
pygame.mixer.pause()
else:
pass
# time.sleep(3600)
if(i == 3600): #complete 1 hr
pygame.init()
pygame.mixer.init()
sounda= pygame.mixer.Sound("water.mp3")
sounda.play()
user = input("Write 'done' if done ! : ")
user = user.lower()
if(user == 'done'):
print("DRINK 2 CUPS OF WATER !!!")
with open("logs.txt","a") as f:
f.write(f"[{time_1}] : Drank 2 cups of water\n")
pygame.mixer.pause()
else:
pass
i+=1
# m = 1800
#the function will be in loop for 8 times , total hours = 8 (in seconds = 28800)
t = 8
while(t > 0):
print(f"time {t}")
# eyes() #30 minutes
print()
# exercise() #45 minutes
print()
water() # 1 hour
t -=1