-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCountimer.py
More file actions
35 lines (29 loc) · 810 Bytes
/
Countimer.py
File metadata and controls
35 lines (29 loc) · 810 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
29
30
31
32
33
34
35
import time
def countdown_timer():
second=int(input("enter second:"))
print("Count Start now....")
while second!=0:
time.sleep(1)
second-=1
print(second)
print("Count End")
print("====welcomt to Countdown timer====")
while True:
choice=input("do you want to set time (yes or no):")
if choice.lower()=="yes":
countdown_timer()
elif choice.lower()=="no":
print("Exit")
else:
print("enter valid choice....try again")
#import time
#def countdown(t):
#while t:
#mins, secs = divmod(t, 60)
#timer = '{:02d}:{:02d}'.format(mins, secs)
#print(timer, end="\r")
#time.sleep(1)
#t -= 1
#print('Fire in the hole!!')
#t = input("Enter the time in seconds: ")
#countdown(int(t))