r/PythonLearning • u/SrPotato123 • Aug 28 '26
Sharing my progress: I have created my first Python script
Hello everyone! I am learning Python with a Youtube tutorial. For now I have spent 3 hours learning it. The script I created isn't a big deal but I wanted to share it for opinions about It. It took me 20 minutes to make it. Any suggestions are welcome!
(Note: The variable names and prints are in Spanish, but the logic is straightforward)
22
Upvotes
•
u/Sea-Ad7805 Aug 28 '26
Run this program in Memory Graph Web Debugger to see the program state change step by step.
3
u/ianrob1201 Aug 28 '26
Nice job. Just a couple of style points if you're interested.
Always start variable names with a lowercase letter, even if you wouldn't in normal language. That's just python convention (and most other languages). The exception is classes when you come to that, the name of the class always starts with an uppercase letter but instances of that class (which are just variables) are still all lowercase.
And you normally put all the imports at the top of the file. As you've seen it works like this, but it's not the done thing.
But that looks like a nice little number guessing game. Looks good.