-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecisiveTest.py
53 lines (43 loc) · 1.32 KB
/
decisiveTest.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
# Decisive test
import time as t
def length(time):
res = ''
if(time < 1):
res = f"{time} seconds is extremely fast."
elif(time < 3):
res = f"{time} seconds is pretty fast."
elif(time < 5):
res = f"{time} seconds is kind of fast."
elif(time < 10):
res = f"{time} seconds is pretty slow."
else:
res = f"{time} seconds is really slow."
return res
def main():
InvalidInput = True
while InvalidInput:
t0 = t.time()
yORn = input("Are you decisive?\n(y / n)\n(e to exit)\n")
yOrnClean = yORn.lower()
t1 = t.time()
totalTime = round(t1 - t0, 2)
if(yOrnClean == 'y' or yOrnClean == 'n'):
message = length(totalTime)
if(yOrnClean == 'y'):
if(totalTime < 5):
print(f"Maybe, {message}")
else:
print(f"I don't know, {message}")
else:
if(totalTime < 5):
print(f"I don't know, {message}")
else:
print(f"Maybe, {message}")
InvalidInput = False
else:
if(yOrnClean == 'e'):
print('Goodbye!')
InvalidInput = False
else:
print("Try inputting Y or N. Idiot.\n")
main()