- Python 3.0 or above
- Download
guess_a_number.py
or clone it to your local repository in order to run it. - To select a version and start playing, uncomment the function call related to your wanted version
-
In the first 2 versions, the player needs to guess the number that was picked by the PC.
These versions are very similar to each other, but each of them is using different approach to do the same thing. -
In the 3rd version, the user gets to choose the number, and the PC needs to figure out this number.
With this version, the PC is using the "Binary Search" Algorithm in order to find the correct number in a fast and efficient way
(reducing time complexity to O(log n) ).