How Can I Improve My First Python Program?

0
7
Asked By CuriousCoder99 On

Hey everyone! I'm revisiting my first Python program and would love some feedback. I'm looking for pointers on how to improve my code and ultimately get a job in IT. I've included a link to my code in the comments since it wasn't working well initially.

Also, I'd appreciate it if you could let me know if my comments in the code are sufficient and if the program aligns with any common coding standards, like rule 6.

3 Answers

Answered By BeginnerBoss On

This is solid for a first attempt! The comments you've included are helpful, but just be careful with clarity. You might want to consider having them in a separate text file for easier access and just a brief explanation in your code instead. Overall, great job on taking the first step into programming! Keep at it!

Answered By SillyBunny42 On

Wait, you didn't start with a 'Hello World' program? The world is crying in a corner somewhere! Just kidding! Seriously though, for a first program, you did good. Your top comments explaining things are neat! Just make sure to keep the explanations close to your code for better readability—it's something I often forget myself!

Answered By CodeNinja77 On

You're off to a great start! I recommend focusing on using more functions in your code; they'll help make your code more organized and reusable. Also, think about using dictionaries instead of those large lists you have. For example, you could structure your nouns and verbs with dictionaries, which will simplify your logic and reduce the number of if statements. Just remember to handle your file operations with context managers, too! It’ll make your code cleaner and avoid some potential bugs.

CuriousCoder99 -

Thanks for the feedback! I don’t know much about functions yet, so I'll look that up. How far would I need to go to reach a working level? Should I explore beyond Python or stick with it for now?

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.