Question
Write a Higher / Lower game where the user tries to guess a random number between 1 and 100. Give the user hints as they
Write a Higher / Lower game where the user tries to guess a random number between 1 and 100. Give the user hints as they guess as to whether the correct number is higher or lower than their guess. Keep track of the number of valid guesses. If the user enters a number that is outside the range of numbers, prompt the user to enter a valid number. When the user correctly guesses the number, the user wins, and the game ends. Display the number of tries it took to guess the correct number. Part 1: Using the software of your choice (some examples include Visio, Word, Power Point, online flowchart software, etc.) Create a flowchart diagram, showing the flow of logic for the program outlined above. Here is an example of what a flowchart looks like: Part 1: Working from the flowchart you created, now write the code for the program. Name your file Operation3. A sample session of how the program should interact is provided below. Sample Session: Welcome to the Higher / Lower game! Try to guess the number between 1 and 100. Enter your guess: -5 Sorry, the guess needs to be a number between 1 and 100. Please try again: -10 Sorry, the guess needs to be a number between 1 and 100. Please try again: 50 The number is higher. Enter your guess: 75 The number is lower. Enter your guess: 63 The number was 63! You guessed correctly! It took you 3 tries.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started