I am getting stuck on getting a guess the number program to be able to count the tries taken to guess the number.
I am getting stuck on getting a guess the number program to be able to count the tries taken to guess the
number.
I can get it to choose the number and tell the user when they have selected it but I cannot get it to count the tries.
I need the output to look similar to the following.
Welcome to my Guess the number program!
Please guess a number between 1 and 10: 4
Too low
Please guess a number between 1 and 10: 5
Too low
Please guess a number between 1 and 10: 8
Too high
Please guess a number between 1 and 10: 6
You guessed it! It took you 3 attempts