Hi everyone, I just started learning programming about a month ago and I'm currently using the mooc-fi Python courses as my primary learning method. I'm trying to grasp the basics without relying on AI just yet, so I can better understand the language and program behavior. Up until now, I've done well absorbing the material and executing examples. When I hit a wall, I watch a couple of YouTube tutorials on the concept before going back to write small scripts to reinforce my understanding. However, I've reached a point where the course requires me to create my first mini program (part 4 - grade statistics) and I've been stuck on it for a week. I keep starting over after realizing my approach isn't working. I understand that I need to create a main program and then use helper functions, but I'm not sure whether I should build the main program first and identify where helper functions fit in or if I should devise a plan of action and define the helper functions first before coding the main program. Any guidance would be greatly appreciated! Thanks for your patience with my lengthy explanation!
2 Answers
For starters, try to break things down. The exercise itself suggests you should keep asking for input until the user enters an empty line. Begin there! Implement that loop and accumulate the exam points and exercise completions. Once you have the basic structure in place, see if any parts of your code need to be reusable—that's where helper functions come into play. Just remember, avoid overcomplicating things too soon—get a simple version working first!
I’d say it's best to write everything in the main program first. As you code, if anything feels like it could be its own helper function (like calculating exercise points), go ahead and extract it then. But focus first on getting the data input, then handle computations in the next phase. Remember that doing too much at once can muddy your progress. For the input, it might help to have arrays ready to store exam points and other values so you can easily access them later. Just keep building up step by step!
Thanks for the advice! So should I create a separate list for each type of input like exam points, exercises completed, etc.? Or just collect that data during input and then compute after?

Definitely agree with starting simple! Once your basic structure is running, you can always improve and optimize it later. The key is to have something functional first before you worry about making it perfect.