Number Guessing Game – Python Code

By | 17-Nov-2020

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

Features:
  • 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:
https://pastebin.com/Rk7pS0B6
Version 3 available here:
https://pastebin.com/ynTqK7dq

Please feel free to comment!