Lesson 11: Functions - Drawing Hangman
Post date: Jan 12, 2018 3:57:31 PM
def drawhangman(missedGuesses):
if missedGuesses <= 0: return
print(" _____________")
if missedGuesses > 1:
print(" | |")
else: print(" |")
if missedGuesses > 2:
print(" | O")
else: print(" |")
if missedGuesses > 3:
print(" | /|\\")
else: print(" |")
if missedGuesses > 4:
print(" | |")
else: print(" |")
if missedGuesses > 5 :
print(" | / \\")
else: print(" |")
print(" |")
print(" |")
print(" |_____________")
for x in range(0,7): drawhangman(x)