You’re going to make a Guess the Number game. The computer will "think" of a secret number from 1 to 20 and ask the user to guess it. After each guess, the computer will tell the user whether the number is too high or too low. The user wins if they can guess the number within six tries. The program should look like this in the console, player input is in bold: Hello! What is your name? Abaddon Well, Abaddon, I am thinking of a number between 1 and 20. Take a guess. 10 Your guess is too high. Take a guess. 2 Your guess is too low. Take a guess. 4 Good job, Abaddon! You guessed my number in 3 guesses! Would you like to play again? (y or n) n Process finished with exit code 0
You’re going to make a Guess the Number game. The computer will "think" of a secret number from 1 to 20 and ask the user to guess it. After each guess, the computer will tell the user whether the number is too high or too low. The user wins if they can guess the number within six tries.
The program should look like this in the console, player input is in bold:
Hello! What is your name?
Abaddon
Well, Abaddon, I am thinking of a number between 1 and 20.
Take a guess.
10
Your guess is too high.
Take a guess.
2
Your guess is too low.
Take a guess.
4
Good job, Abaddon! You guessed my number in 3 guesses!
Would you like to play again? (y or n)
n
Process finished with exit code 0
Questions for this assignment
The problem statement is vague, how do I make the computer "guess" a number?
language java
can you help me pls

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images








