I've finished courses covering functions, lists, operators and other fundamentals, but I still don't know where to start when I want to build something. What would be a useful first step?
I know some Python basics, but how do I actually start a project?
Answers
Make the first version almost embarrassingly small. Ask for a name and print it in uppercase. Once that works, add one thing, such as asking for a second name and printing both.
That counts as practice. You can keep adding pieces, or start another tiny program. The point is to get used to choosing what the code needs to do instead of following steps someone else has already chosen.
Reply to this answer
Before opening a blank file, write the steps in plain English. For a simple expense tracker, that might be: ask for an amount, add it to a list, then print the total. Skip saving to a file for the first version.
Turn one step at a time into Python and run it as you go. If you get stuck, look up that specific step or error rather than another complete course. Once the basic version works, you can add categories or saving to a CSV.
Reply to this answer
If a blank file is too much of a jump, follow a short walkthrough once, then close it and try to rebuild the same program from memory. Check the guide when you're stuck, but try the missing bit yourself first. Afterward, change one feature so you have a new problem to solve.
Reply to this answer
You don't need a big project idea to practice. Pick one topic that feels shaky and make a little program around it. For functions, try a calculator with a separate function for each operation. For lists, collect a few items and print them back.
Try writing a feature without your notes, then use the error message, documentation or an explanation tool to help you understand what went wrong. Looking things up is fine. The useful part is working out how the fix fits into your code.
Reply to this answer
Add your answer
Answers are reviewed before publication.
k.395!fableladle:
Comments in the Python file work well for those steps. You can replace each comment with code as you figure it out.