A collection of small terminal-based games and tools built while learning Python fundamentals. Each project focuses on core programming concepts like loops, conditionals, functions, and working with the random module.
A classic two-player game against the computer.
How to run: python rock_paper_scissors.py
Concepts used:
whileloop to keep the game running until the player quitsif / elif / elseconditionals to determine the winnerrandom.randint()to generate the computer's movebreakstatement to exit the loop cleanly on quit
An extended version of the classic game with two extra moves — inspired by The Big Bang Theory. Each move beats two others and loses to two others.
How to run: python rock_paper_scissors_lizard_spock.py
Concepts used:
- Same core logic as above, expanded with additional win/loss conditions
inoperator to check if a value belongs to a list (e.g.computer in [2, 5]) — makes multi-condition checks cleanerwhileloop with abreakfor quitting
Win conditions:
| Move | Beats |
|---|---|
| Rock | Scissors, Lizard |
| Paper | Rock, Spock |
| Scissors | Paper, Lizard |
| Lizard | Paper, Spock |
| Spock | Rock, Scissors |
A menu-driven tool that calculates the area of four geometric shapes.
How to run: python area_calculator.py
Concepts used:
whileloop with a menu to allow repeated calculationsif / elif / elseto route to the correct shape formula**exponentiation operator (e.g.side ** 2for square area)- Basic arithmetic:
*,/,+ - User input with
int()type conversion
Shapes supported: Triangle, Rectangle, Square, Circle
A turn-based battle game in the terminal. You play as King against Bryan Fury. Each turn both players choose a move simultaneously — attack, block, or heal — and HP changes based on the matchup.
How to run: python tekken_game.py
Concepts used:
whileloop to run the game until HP hits 0 or the player quitsrandom.randint()for the computer's move each turnif / elif / elsefor all move matchup outcomesbreakto exit the loop on quit- Multiple variables tracking game state (
king_hp,bryan_hp)
Move logic:
| Your Move | Computer's Move | Result |
|---|---|---|
| Attack | Attack | Both lose 10 HP |
| Attack | Block or Heal | Computer loses 10 HP |
| Block | Attack | You lose 10 HP |
| Heal | Heal | Both gain 10 HP |
| Heal | Attack | Computer loses 10 HP |
Make sure Python is installed, then run any file in your terminal:
python filename.pyNo external libraries needed — only Python's built-in random module is used.
These projects helped me get comfortable with:
- Writing and controlling loops
- Taking and validating user input
- Using randomness to simulate a computer opponent
- Breaking down game logic into clear conditions
- Structuring small programs from scratch