You will practice:
- Use loops
- Use if, else and elif blocks
✏️ Create a number guessing game. The user should be asked to enter a number between 1 and 100. A random number should be generated, which the user will guess.
✏️ If the user's guess is too low or too high, the script should print a descriptive message (E.g. Your guess is too low). If the user guesses the correct answer, the script should print out the number of tries, before exiting.
Here is some example execution:
Please enter a number between 1 and 100
Number: 50
The number is too low
Number: 75
The number is too high
Number: 66
The number is too high
Number: 57
The number is too low
Number: 60
The number is too high
Number: 59
The number is too high
Number: 58
Wooho! You guessed it using 7 tries.