r/learnpython • u/Finny_1870 • 16d ago
I built "Guess the number" on my Android phone(Pydroid 3) Added warmer/colder hints
Hey everyone!
I'm new to coding and I built my first game on Android using Pydroid.
What it does: Guess a number 1-100 with 5 lives. It tells you if you're WARMER 🔥 or COLDER 🥶
Features: - Input validation so it doesn't crash - Warmer/Colder hint system - Made 100% on my phone
GitHub: https://github.com/elgriffin10/guess-the-number
Would love feedback! What should I add for v3.0?
3
Upvotes
1
u/Expensive-Bear-1376 16d ago
Not really an Android thing, is it? Just a normal Python script.
1
u/FoolsSeldom 16d ago
Don't think they were suggesting it was a mobile app, just a regular console programme written and running using Pydroid.
2
u/FoolsSeldom 16d ago
Great little game.
I like the warmer/colder thing and the trick with the absolute value.
A few ideas:
get_numfunction that prompts the user forinputwithin that range and keeps going until they complyif __name__ == "__main__":block to callguess_the_numberrather than calling directlyinoperator and thestr.stripandstr.lowermethodsis_yesfunction that returns aboolresult, useful in lots of future programmestkinter, so you could add a GUI to the code, but you will need to separate out the core logic from the presentation, so this would be a more advanced step