Skip to content

Travantiv2/Guess-the-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

T's Code Cracker 🔐

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.

What it does

  • 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

Why I made this

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.

How to run it

  1. Open the .py file in VS Code (or whatever you're using)
  2. Hit the green play/run button
  3. Use the terminal to type in your guesses when it asks

Stuff I might add later

  • Difficulty modes (like a 4-digit version)
  • Replay option after the game ends
  • Cleaner formatting and maybe a timer
  • High score or attempt tracker

Updates

  • v1.0 – First version! Fully working with code generation, input checks, clue logic, and game loop

License

MIT License — feel free to use it, mess with it, and make it your own.


Author

Travanti Lipson Jr
📧 [email protected]
🔗 GitHub: https://github.com/Travantiv2

About

I created a guess the code game to further strengthen my if/else logic understanding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages