-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallows.py
35 lines (34 loc) · 1.65 KB
/
gallows.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
gallows = [
["____________________", ' |', ' |', ' |', ' |', ' |', '---------- '],
["____________________"," | |", ' |', ' |', ' |', ' |', '---------- '],
["____________________"," | |"," | O", ' |', ' |', ' |', '---------- '],
["____________________"," | |"," | O", " | |", ' |', ' |', '---------- '],
["____________________"," | |"," | O", " | / |", ' |', ' |', '---------- '],
["____________________"," | |"," | O", " | / | \\", ' |', ' |', '---------- '],
["____________________"," | |"," | O", " | / | \\", " | /", ' |', '---------- '],
["____________________"," | |"," | O", " | / | \\", " | / \\", " |", "---------- "]]
def gallows_type(lives):
if lives == 7:
for sym in gallows[0]:
print(str(sym))
elif lives == 6:
for sym in gallows[1]:
print(str(sym))
elif lives == 5:
for sym in gallows[2]:
print(str(sym))
elif lives == 4:
for sym in gallows[3]:
print(str(sym))
elif lives == 3:
for sym in gallows[4]:
print(str(sym))
elif lives == 2:
for sym in gallows[5]:
print(str(sym))
elif lives == 1:
for sym in gallows[6]:
print(str(sym))
elif lives == 0:
for sym in gallows[7]:
print(str(sym))