-
Notifications
You must be signed in to change notification settings - Fork 0
/
simonSays.py
125 lines (112 loc) · 3.59 KB
/
simonSays.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
colorArray = []
def main(running):
while running == True:
serialVowel = raw_input("Does the serial number contain a vowel? ").lower()
strikeAmount = raw_input("How many strikes have you taken? ").lower()
print "\n"
if strikeAmount == "0" or "none" or "zero":
strikeAmount = 0
elif strikeAmount == "1" or "one":
strikeAmount = 1
elif strikeAmount == "2" or "two":
strikeAmount == 2
else:
running = False
if serialVowel == "yes":
if strikeAmount == 0:
red = "blue"
blue = "red"
green = "yellow"
yellow = "green"
elif strikeAmount == 1:
red = "yellow"
blue = "green"
green = "blue"
yellow = "red"
elif strikeAmount == 2:
red = "green"
blue = "red"
green = "yellow"
yellow = "blue"
else:
running = False
elif serialVowel == "no":
if strikeAmount == 0:
red = "blue"
blue = "yellow"
green = "green"
yellow = "red"
elif strikeAmount == 1:
red = "red"
blue = "blue"
green = "yellow"
yellow = "green"
elif strikeAmount == 2:
red = "yellow"
blue = "green"
green = "blue"
red = "red"
else:
running = False
firstColor = raw_input("What is the first color? ").lower()
if firstColor == "red":
colorArray.append(red)
print "Click: " + colorArray[0] + "\n"
elif firstColor == "blue":
colorArray.append(blue)
print "Click: " + colorArray[0] + "\n"
elif firstColor == "green":
colorArray.append(green)
print "Click: " + colorArray[0] + "\n"
elif firstColor == "yellow":
colorArray.append(yellow)
print "Click: " + colorArray[0] + "\n"
else:
running = False
secondColor = raw_input("What is the second color? ").lower()
if secondColor == "red":
colorArray.append(red)
print "Click: " + colorArray[0] + " " + colorArray[1] + "\n"
elif secondColor == "blue":
colorArray.append(blue)
print "Click: " + colorArray[0] + " " + colorArray[1] + "\n"
elif secondColor == "green":
colorArray.append(green)
print "Click: " + colorArray[0] + " " + colorArray[1] + "\n"
elif secondColor == "yellow":
colorArray.append(yellow)
print "Click: " + colorArray[0] + " " + colorArray[1] + "\n"
else:
running = False
thirdColor = raw_input("What is the third color? ").lower()
if thirdColor == "red":
colorArray.append(red)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + "\n"
elif thirdColor == "blue":
colorArray.append(blue)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + "\n"
elif thirdColor == "green":
colorArray.append(green)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + "\n"
elif thirdColor == "yellow":
colorArray.append(yellow)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + "\n"
else:
running = False
fourthColor = raw_input("What is the fourth color? ").lower()
if fourthColor == "red":
colorArray.append(red)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + " " + colorArray[3] + "\n"
elif fourthColor == "blue":
colorArray.append(blue)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + " " + colorArray[3] + "\n"
elif fourthColor == "green":
colorArray.append(green)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + " " + colorArray[3] + "\n"
elif fourthColor == "yellow":
colorArray.append(yellow)
print "Click: " + colorArray[0] + " " + colorArray[1] + " " + colorArray[2] + " " + colorArray[3] + "\n"
else:
running = False
running = False
main(True)