“Write a program to find the sum of all the even numbers in a list“
After two weeks of daily coding lessons, Irfan has made significant progress. He has typed in 35 exercises from the book of LPTHW. This means that he has covered conditionals, loops and functions in Python.
Now that he’s covered loops there’s a lot of exercises that he can work on. I think he needs to do a lot of ‘drill and practice’ with these problems until he can write programs blindfolded. Here are examples of some of the exercise which he has been working on:
“Write a program that takes in a list of numbers and prints out the sum (or average) of these numbers”
“Write a program that calculates the maximum (or minimum) value of a list”
“Write a program that flips the sign of every element in a list (example -5 turns into +5)”
At this point in time I think it is wise to pause on learning any further concepts until he masters these core ones. We won’t move on to ‘classes’ or ‘objects’ before he understands functions well.
A good technique for beginners is to start writing a program without any functions and then to extract the functions out of the program. This gives coders an understanding of code refactoring, and how functions actually aid in readability and maintainability of their code. Seeing the ‘before’ and ‘after’ of their code gets the point across. This develops a good mindset for that purpose.
Recalling back the original goals from this training:
1- Being able to read algorithmic problem statements and write solutions to them.
At the moment we are in a great position to achieve this. With the drill-and-practice algorithm questions focusing on loops and other conditions we will be able to reach this goal.
2- Supervised contribution to one open source project of his choice (documentation fix, bug fix, ..).
We have not made a start on this yet. The plan is to perform this during the last 2 weeks off the training. There are too many concepts to grasp at this point so I don’t want to have git being yet another one to get in his way. I’d rather have him master the rest of the concepts before worrying out Source Control.
3- Life-long learning – being able to look up documentation for other programs and packages, based on whatever he is trying to do
We haven’t been doing much in this regard. Well, I try to get out of his way when he’s coding. And I resist the urge to take over his keyboard while answering his questions. But that is about it. In the future when he asks questions I will ask him to google it and look at Stackoverflow posts or the python docs. This is especially true for when he will be working on his final charity project.
4- BONUS: Reaching a final stage of a job interview for a tech position (junior python developer)
We will attempt this after his initial training period and try to apply for multiple junior programmer roles to see how that goes (very exciting).
Until next time!
We are Automark, an assessment platform for CS educators. We’re about engaging students to write more code, giving them better feedback, and saving teachers some time. Contact us if you want to give it a go in your classroom.