Question: This program will be a hangman application. The user will try to guess a word set by the other player. This program should work with
This program will be a hangman application. The user will try to guess a word set by the other player. This program should work with any letter word. The game will only work with a letter word. There will be a series of tests that will make sure the word entered by player one is letters. If the word to guess is too long, we will produce an error. If the word to guess is too short, we will produce another error. The user will have letter guesses and word guesses. Once we verify the word to guess is letters we will ask the user to take a guess at the letter, tell them if they got the letter right view output below for details on how we show this and then ask them to guess the word; we will call this action a turn. The player will have turns. When comparing the letters or the word, the case of the letters or word does not matter eg H h If the user guesses the word correctly in turns, we will give them a message telling them they won and how many guesses it took them to guess the word correctly. If the user does not guess the word right in guesses we will tell them they lost and tell them what the word was. Any kind of error on user input will end the program with an error message letter guess being too long, word to guess being too long and word to guess being too small If the user is asked to guess a letter but they insert more than a letter the program will tell them You are supposed to enter only a letter. Run the program again. The only error that I do not want you to handle is if the user enters a number for a letter guess, this will break your program; most likely, and that is okay. Please note that the user guessing the word can guess any length word eg word to guess Hello user guesses the word dog. This is fine There are examples below of how the program should run. I will be testing your program extensively with different words, different letter guesses, incorrect and correct letter guesses, etc. So make sure you run through all the different possible scenarios your program might encounter.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
