pyBegin / projects / guess-number
🎮

Guess Number

A number guessing game. Two versions are included:

70 lines🖥 Desktop only

Guess Number

A number guessing game. Two versions are included:

Example

Welcome to Number Guesser. If you'd like to play, press 'Y' or press 'X' if you want to exit: Y

Enter number between 1 to 10: 5

Number is higher than 5

Enter number between 6 to 10: 8

Number is lower than 8

Enter number between 6 to 7: 7

Congrats! You've guessed the correct number! It was 7.

You have tried 3 times to find the number.

How to run on localhost

python guess_number.py

or, for the GUI version:

python guess_num_v2.py

Dependencies

Standard library only (random, plus tkinter for the GUI version).