-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurvey (1).py
70 lines (69 loc) · 1.95 KB
/
survey (1).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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
dictList=[]
x = 0
import time
while x == 0:
print("welcome to the survey. if you want to stop survey type 'stop' at anytime.")
a = input ("How old are you?????")
while True:
if a.isdigit():
print(a)
break
elif a == "stop":
x = 1
else:
print("Please enter a number /:")
a = input ("How old are you?????")
b = input ("Do you live in the United States of America????")
placelist= ["yes", "no"]
while True:
if b in placelist:
print (b)
break
elif b == "stop":
x = 1
else:
print("Choose an actual answer :/")
b = input ("Do you live in the United States of America????")
c = input ("Do you have a pet???")
petlist = ["yes", "no"]
while True:
if c in petlist:
print (c)
break
elif c == "stop":
x = 1
else:
print("Choose an actual answer :/")
c = input ("Do you have a pet???")
d = input ("How many people are in your family??")
while True:
if d.isdigit():
print(d)
break
elif d == "stop":
x = 1
else:
print("Please enter a number /:")
d = input ("How many people are in your family??")
e = input ("Is the sky blue?")
skylist = ["yes", "no"]
while True:
if e in skylist:
print (e)
break
elif e == "stop":
x = 1
else:
print("Choose an actual answer :/")
e = input ("Is the sky blue?")
print("The survey will start over in 3 seconds, thank you for your time.")
question = {
'age' : a,
'place' : b,
'pet' : c,
'family' : d,
'sky' : e,
}
dictList.append(question)
time.sleep(3)
print (dictList)