Number Guessing Game – Python Code

By | 17-Nov-2020

I modified one version of the fairly common Number Guessing game written in Python.

  • Play against computer
  • Computer adjusts to each wrong guess
Possible bugs/improvements
  • You can deliberately guess too high to mislead the computer – fixed in v.3. This is no longer possible.
  • Can be improved to have several rounds and keep track of who wins each round
  • Allow player to set number of chances – done in v.3
  • Allow player to set range of numbers – done in v.3. Player can set upper limit.
Find it here:
Version 3 available here:

Please feel free to comment!