-
Notifications
You must be signed in to change notification settings - Fork 1
/
hangmanproject_unit2.py
71 lines (66 loc) · 1.42 KB
/
hangmanproject_unit2.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
# hangman project - second unit exercise.
# author - lirom mizrahi
# In this exercise you will start developing the game by designing an "opening screen" that will
# appear to the player who starts playing. You need to create a designed "open screen"
# for the game.
# limit your gusses by using randint function
# Write a piece of code that prints to the screen the seven states of the hanging man, in order. The prints will be used by us in the advanced development stages of the game.
# Remember how you completed the previous exercise
# name of the game:
HANGMAN_ASCII_ART = print(""" _ _
| | | |
| |__| | __ _ _ __ __ _ _ __ ___ __ _ _ __
| __ |/ _` | '_ \ / _` | '_ ` _ \ / _` | '_ \\
| | | | (_| | | | | (_| | | | | | | (_| | | | |
|_| |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
__/ |
|____ / """)
MAX_TRIES = random.randint(5,10)
print(MAX_TRIES)
guess_a_letter= input("Guess a letter:" )
print(guess_a_letter.lower())
#images for the wrong gusses
#picture 1:
print("x-------x")
#picture 2:
print("""x-------x
|
|
|
|
|""")
#picture 3:
print("""x-------x
| |
| 0
|
|
|""")
#picture 4:
print("""x-------x
| |
| 0
| |
|
|""")
#picture 5:
print("""x-------x
| |
| 0
| /|\\
|
|""")
#picture 6:
print("""x-------x
| |
| 0
| /|\\
| /
|""")
#picture 7:
print("""x-------x
| |
| 0
| /|\\
| / \\
|""")