-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer.py
More file actions
20 lines (19 loc) · 694 Bytes
/
timer.py
File metadata and controls
20 lines (19 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import time
import os
os.system("sudo apt install python3-full")
# input hour
timer = float(input("how can today? "))
if timer < 5 and timer > 0:
seconds = 0
miniutes = 0
for i in range(0, timer): # loop for calculate time
while seconds == time * 3600: # calculate time for send notification
seconds = seconds + 1
print(seconds)
time.sleep(1) # Delay
if seconds == 60: # calculate miniutes
miniutes = miniutes + 1
if miniutes == 25: # Send Notf
print("Time to have some tea or coffee and rest for a few minutes. Dont be tired")
else:
exit("Err: hour is not authentic")