This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate a word at random and store it in a variable | |
# display the length of the word to the user | |
# correct_guesses is less than the length of the word | |
# prompt the user to guess a letter | |
# if the guess is correct increment correct_guesses by 1 | |
# if the guess is incorrect increment incorrect_guesses by 1 | |
# and draw the next part of the hangman | |
# if the incorrect_guesses is greater than 8, tell the user | |
# they lost and exit the program | |
# if correct_guesses is equal to the length of the word, tell the user they won |