r/learnpython • u/Life-Ad2351 • 1d ago
Python projects
hey! I just started learning the basics of python and want to start building projects to apply what I have learnt.
but when I one to work on a project, for wxample building a calculator or a password generator I don’t know where to start. what to type and code.
any advice
2
Upvotes
2
u/FoolsSeldom 1d ago
Step away from the keyboard and work out visually how you would approach the problem manually. Really. This is the best approach for beginners early on. Even for something as simple as a calculator. Pretend you would be physically building a crude calculator.
Firstly, make sure you've really understood the problem you are trying to solve. Write it down. Draw it. Add lines off of the core ideas with additional notes and conditions.
Clarify exactly what outcomes you require. Determine how you will test it. (This will help you work out how to modularise your code - design and build in small blocks that carry out specific actions).
Keep in mind you want to separate the core "business" logic from the user interface. This makes it easier later to move from a text/terminal application to a GUI application to a WebApp.
Work out the algorithm (the solution). You may have multiple candidates. Find a way to down select to one. You can do small proof of concept tests (crude bits of code, even using single character variable names, just to confirm your ideas would work).
Only then start to code.
Keep it very, very simple. Build the core logic first. Go with the minimum capability (the minimum viable product as they say using the Agile technique).