This is a Python source code for playing the higher-lower game for a short fun break.
Higher-Lower Game using Python
The source code for the higher-lower game is written in Python. The packet uses the "random" python package. This module implements pseudo-random number generators for various distributions.
The game works in the following way:
1. The computer chooses a number at random from 1-10 using the random module in Python
2. The player has to guess what number was chosen by the computer
3. The computer then tells you if the number the player guessed is higher, lower or equal to the number chosen by the computer
4. To make the correct guess, the computer offers the player 2 chances
5. On guessing the correct number, the game ends without offering any further chances
How to run the program:
1. Download the packet zip folder
2. Open the folder and locate the higherlower.py file
3. Simply double-click on the file and it will execute on command prompt