-
Notifications
You must be signed in to change notification settings - Fork 2
/
TEST.py
45 lines (31 loc) · 912 Bytes
/
TEST.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
from ast import Store
from urllib import response
import time
import os
import threading
total = 0
print ("how many people are paying for the meal?")
total == 0
#while total == 0:
def f():
try:
if a != "Accepted word":
timer.cancel
print("...")
quit()
except NameError:
#This makes the code run anyway since if the user inputs nothing
#'a' will still be undefined and python will still be waiting for an input
timer.cancel
print("...")
if a == "":
quit()
#Like I said, Python won't actually stop until an input is made
else:
#This runs fine if the user inputs the 'accepted word'
timer.cancel
print(...)
quit()
timer = threading.Timer(5.0, f)
timer.start()
a = input(">")