WSQ06 – Pick a Number

WSQ06 – Pick a Number

This program picks a random number from the range of 1 to 100, so basically it’s a little game where it asks you to enter a number, if the number you entered isn’t the same as the one the program picked, it will inform you if it’s either too high or too low, when the number you entered is the same the program randomly picked it prints “You guessed the number!”

I used while to create a loop where it keeps giving you the option to enter more numbers until you’ve guessed it. And if and else to each case.

WSQ06 – Pick a Number

CC BY 4.0 WSQ06 – Pick a Number by tywins is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.