Question
I need to create a Random Guess game in java which requires the player to guess a number and the program generates a random number
I need to create a Random Guess game in java which requires the player to guess a number and the program generates a random number between 10 & 100. The programs continuously ask the user for the new guess and indicate whether the guess is high or low until the right answer. After the user guessed the right number, display a count of attempts also. Prompt user to enter seed value and used seed value to create a target value.
It needs to look like this but enter your own seed value and guess number. Depending on the guess number there should be sentences that will tell you if the number was high or low from the correct answer. Once the correct number is guessed there should be a sentence telling you how many attempts to guess the number followed by what was the actual number.
Sample:
Enter seed value: (Input Seed here)
Enter your guess: (Input Guess number)
Too low! try again.
Enter your guess: (Input Guess number)
Too high! try again.
Enter your guess: (Input Guess number)
Too low! try again.
Enter your guess: (Input Guess number)
Too high! try again.
Enter your guess: (Input Guess number)
Too low! try again.
Enter your guess: (Input Guess number)
It took you 6 (# of Attempts) turns to guess my number, which was (Correct Guessed Number)
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