Mini-games written in Python originally for later ported to Pygame
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Mini-games created as part of the Coursera course "An Introduction to Interactive Programming in Python" provided by Rice University, and later converted and modified to work outside of as well.

Tested with Python 2.7!

How to run

git clone
cd python-minigames
pip install -U -r requirements.txt
python <game-name>.py



The game requires no Introduction to any of us. Simply 'Hit' or 'Stand' or start a new round by clicking on the 'Deal' button. You bust if you go over 21 and A(ce) can be either 1 or 11. King, Queen and Jack are valued at 10. All other cards represent their own value.

Blackjack screenshot

Rock, Paper, Scissors, Lizard, Spock

This game is not compatible with

A modified version of the well-known 'Rock, Paper, Scissors' game with the addition of two extra choices: Lizard and Spock (yes, from Star Trek).

In short:

Scissor > Paper > Rock > Lizard > Spock > Scissor > Lizard > Paper > Spock > Rock > Scissors

In a bit longer form:

Scissors cuts Paper covers Rock crushes Lizard poisons Spock smashes Scissors decapitates Lizard eats Paper disproves Spock vaporizes Rock crushed Scissors.

RPSLS screenshot


Not much to explain: just a simple stopwatch.

Stopwatch screenshot

Guess the number

A simple game where you have to guess the number between 1-100 or 1-1000 out of 7 tries. Once you try an guess, it will tell you if either you have to select a higher or a lower number, or that you got it right!

Guess the number screenshot


A python adaptation of the well-known Asteroids game from Atari. Use the left-right keys to change the angle of the rocket and press the back-forward to throttle.

Asteroid screenshot


A simple and well-known memory game where you have to guess the pair of cards by always folding up 2 of them. Each two-card fold counts as a move and you have to unfold them all by the least number of moves to win.

Memory screenshot


Another well known Atari game adaptation in Python. To move the paddles, use the W-S keys for Player 1 and the arrow keys (up-down) for Player 2. The gameplay never ends, but there's an option to Restart the score.

Pong screenshot


I would prefer if you would open an issue under the Issues tab here on GitHub!


Freely provided under the MIT License.