How’s My Basic Number Guessing Game in Python?

0
7
Asked By CuriousCoder87 On

I've created a simple number-guessing game in Python that tells players how close they are to a randomly generated number between 1 and 100. You can check out the code here: [GitHub Link]. I'd love some feedback on whether it's decent for someone who's just starting out!

4 Answers

Answered By LearningTogether On

I see room for some improvements, but it’s great for a beginner! One suggestion is to avoid repeating the same messages for wrong guesses. And longer variable names can actually help clarify your code!

Answered By HelpfulHacker On

I think it's neat that you used functions in your game! That's a solid step for a beginner. Also, since you're using git already, you're on the right track compared to most starters!

Answered By DevGuru99 On

Hey! A couple of tips: instead of using abbreviations like `nwgme` or vague variable names like `num` and `x`, try using clearer names like `new_game`, `target_number`, and `keep_playing`. It makes your code easier to read! And organization matters too; it's good practice to place `import` statements at the top, followed by function definitions, then variables, and lastly your main code.

Answered By CodeNostalgic On

This brings back memories! My first programming experience was in BASIC on a 286 too. What model did you use? It was such a fun time experimenting with early computers!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.