Guessing game Assignment
I'm thinking of a number. Guess it. If you've ever played that game of some version of it then you're ready for the next assignment. The computer will "pick" a number. Actually, you'll program one in the code. You can use a random number if you're ambitious.
Create a number-guessing game using a while loop. The loop will allow users to guess until they get the number right. Your program will keep looping as long as the guess is different from the secret number.
The output should look like this:
I have chosen a number between 1 and 10. Try to guess it.
Your guess: 5
That is incorrect. Guess again.
Your guess: 4
That is incorrect. Guess again.
Your guess: 8
That is incorrect. Guess again.
Your guess: 6
That's right! You're a good guesser.