Pseudocode for Hangman Lab open input file set quit to false repeat set gameover to false set bodyparts to 6 get next word from file make guessedword have _ for each letter in word init lettersGuessed to empty while not gameover display guessedword display lettersGuessed display menu 1) quit program 2) guess a letter 3) guess the word 4) start a new game read choice process choice (see below) until the user quits or no more words if 1) quit set gameover to true set quit to true if 2) guess a letter prompt for guess read letter add letter to lettersGuessed set found to false for each index in word if char at index in word is letter set char at index in guessedword to letter set found to true if not found add next body part to hangman (subtract 1 from bodyparts) if bodyparts is 0 (hangman complete) display failure set gameover to true if 3) guess the word prompt for wordguess read wordguess if wordguess is word display success else display failure set gameover to true if 4) start new game set gameover to true