This is a simple number-guessing game I built while learning Python. It helps practice using if
, elif
, and loops while also making you think through logic. The goal is to guess a secret 3-digit code with no repeating numbers. The game gives you hints after every guess so you’re not completely lost.
- Randomly picks a 3-digit code using digits 0–9 (no repeats)
- Gives you 10 chances to guess the right code
- After every guess, it gives clues to help:
- Match — You got the right number in the right spot
- Close — The number is in the code, but in the wrong spot
- Nope — That number ain’t in the code at all
- Ends if you guess it or run out of tries
I’m learning Python and wanted another project to help me get better at if/else
statements, loops, and comparing lists. After finishing my ATM project, I wanted something a little more logic-heavy but still fun to play. This was just the right kind of challenge.
- Open the
.py
file in VS Code (or whatever you're using) - Hit the green play/run button
- Use the terminal to type in your guesses when it asks
- Difficulty modes (like a 4-digit version)
- Replay option after the game ends
- Cleaner formatting and maybe a timer
- High score or attempt tracker
v1.0
– First version! Fully working with code generation, input checks, clue logic, and game loop
MIT License — feel free to use it, mess with it, and make it your own.
Travanti Lipson Jr
📧 [email protected]
🔗 GitHub: https://github.com/Travantiv2