- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer.py
More file actions
Latest commit
32 lines (17 loc) · 612 Bytes
/
Copy pathtimer.py
File metadata and controls
32 lines (17 loc) · 612 Bytes
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
importtime
whileTrue:
try:
pilih= (input("apakah ingin menggunakan timer(y/n)"))
ifpilih=="y":
detik=int(input("masukkan berapa detik: "))
menit=int(input("masukkan berapa menit: "))
jam=int(input("masukkan berapa jam: "))
waktu=detik+menit*60+jam*3600
elifpilih=="n":
break
forxinrange(waktu+1):
print(waktu-x)
time.sleep(1)
print("time's up")
exceptValueError:
print("oops harus angka!")