A game in which the player has to correctly guess the answer. Making a diagnosis in such cases can be a real guessing game.
The objective is to ask the player to submit a number guess between 1 and 100. The program should ask the player if they want to play in easy or hard mode, wherein easy mode has 10 attempts, and hard mode has 5 attempts.
Welcome to the Number Guessing Game!
I'm thinking of a number between 1 and 100.
Choose a difficulty. Type 'easy' or 'hard':
The user can keep guessing the number until their attempts run out
You have 10 attempts remaining to guess the number.
Make a guess: 12
Too low.
You have 9 attempts remaining to guess the number.
Make a guess: 90
Too high.
If the user successfully guessed the number, a winner notification will be displayed. Otherwise, a game-over notification will be displayed.
You got it! The answer was 52.
You've run out of guesses, you lose.