pythoncamp0

Guess the number

The Project

Guess the number is a mini-project from a Coursera course: An Introduction to Interactive Programming in Python (Part 1).

The Game

According to the assignment page:

One of the simplest two-player games is “Guess the number”. The first player thinks of a secret number in some known range while the second player attempts to guess the number. After each guess, the first player answers either “Higher”, “Lower” or “Correct!” depending on whether the secret number is higher, lower or equal to the guess. In this project, you will build a simple interactive program in Python where the computer will take the role of the first player while you play as the second player.

The code

Since it's requested to involve SimpleGUI for this project, both codeskulptor code and GitHub code are given.

codeskulptor code

Future tweaks

  • Local Python GUI module.
  • Fonts and layouts of outcome.

Local Python GUI module

Python version shift

SimpleGUI

https://github.com/OpenMindClub/OMOOC.py/wiki/codeskulptor_in_local

http://stackoverflow.com/questions/17869101/unable-to-install-pygame-using-pip

http://stackoverflow.com/questions/17886647/cant-install-via-pip-because-of-egg-info-error

http://stackoverflow.com/questions/17886647/cant-install-via-pip-because-of-egg-info-error

http://stackoverflow.com/questions/11425106/python-pip-install-fails-invalid-command-egg-info