Read the wesite linked to the left for a background to the concept of PRIMM and how it can help students to learn to program.
We start with Predict in the Reading Code section. Student see code examples and, together, try to predict what they might do. The Video (maybe a bit long) explains the key concepts of Python Syntax (variables, loops, conditions, indents etc). Students do NOT have to get them all right!
The Tracing section allows students to read, predict and Investigate code samples. All answers are supplied and the video walks through three example (do these WITH the students and encourage dialogue and helping each other) Then they get to try a few on their own or with a partner.
The Debugging exposes kids to even more code and this time they get to Run the code, Investigate it and Modify it. The video explains the two types of error (Syntax vs Logic) and again works through some of the problems presented to them in the interactive embedded Python editor.
Writing Code is where they get to put into practice some of the syntax that they have learned. A cheatsheet is included and in each "problem" they are given the Pseudocode. This avoid the congnitive overload of problem decomposition and allows them to focus on syntax. Again the video works through three examples that students do along with the video or their teacher. Then they get to try a few of the others.
Python is hard and students need to be OK with making errors. The key curriculum capabilities of self-management and problem solving are highly relevant and this unit contains plenty opportunity for collaboration, communication and creativity too.
Feel free to make a copy for yourself if you want to change it.
Slideshows:
Reading Code: https://docs.google.com/presentation/d/1bTROgahOFe9JJ6otqFmv0wFOgJtuFxxWyVxHCq7lJKY/view
Debugging Python: https://docs.google.com/presentation/d/1ToF8kYZ4RO7UrnE9NyQ_nJEq5mS5b3ZpKMr5v1CYTZc/view
Code for Humans: https://docs.google.com/presentation/d/1jDEecjhG_4hbXmy-VZKpIhw2vRWc7hYBTfTkJuUSRCs/view
Resources:
Tracing Exercises #1: https://docs.google.com/document/d/1kp2w6BtA6eGgivEB1i1pG5OPdc-FEIBDK7j-ffaPPRY/view
Tracing Exercises #2: https://docs.google.com/document/d/1LPdr9rqOugB9RNlGqeayK1xwpk0UuhRBw_U0QKrgjdA/view
Tracing Exercises #2 Answers: https://docs.google.com/document/d/1NRgsAe4j7Za4zgGgh8sFEYVtX2hQwyX9Rrac6R-7IYg/view
Math Quiz Document: https://docs.google.com/document/d/1jY-L-Y5sPIXwZOWwDDX9u4_r3VU7w6pJJmMlBK7qJHQ/view
Math Quiz Document Completed: https://docs.google.com/document/d/1_o-PUl4lKai4dQJ8xUU6zgcW-auuAuvuLcjDXIYuorU/view
Guessing Game Assessment Doc: https://docs.google.com/document/d/1lsrCeWiV4yOCr37XTEZIDDXbi2rPubBZOo4wM_whnnw/view
Tools:
These repos can be forked and have an editor included so you can have your own copy and add to them. The repos contains all instructions.
Python Debug Tool:
Github repo: https://github.com/SteveRodkiss/Python-Embed
Live Link: https://steverodkiss.github.io/Python-Embed/
Python Challenges Tool:
Embedable Python Editor with Step by Step Debugger:
Section 1: Reading Code
1-2 lessons
The video is quite long, so break it up into section. Stop the video and ask questions and demo some of the things the video show like variable naming or looping. I added a link to the Python Editor that we use later in the course for you to use. The kids who are familiar with Python can code along with you or the video if they are OK with it, but that's not really the point.
The "check-in" is the quizzes and the Blooket. For the quizzes, follow an "I do->we do->you do" approach. Work through one then ask then work with the class to complete another then ask them to complete as many as they can on their own.
Section 2: Tracing
1-2 lessons
Watch the video as I've had to make some decisions on how to do this and it may not be exactly as you expect. Again, you can play and stop the video or, preferably, demo the tracing yourself. Again I do->we do->you do works good with one demo by you then work through a couple with the class then let them complete the rest on their own. There are answers on the Exercise #1 and no answers on Exercise #2 so you can use this as a "hand in" checkpoint to mark to go towards their progress.
Section 3: Debugging
1-2 lessons
I updated the embedded tool to bring it in line with the other pages, but as a result, the video doesn't match. But the content is the same. Like before demo (I do) work with the kids to work out another (we do) and then let them try complete some more on their own or with a partner using "pair programming". The Full-screen Version of the tool works best and they now use the drop-down to select the debugging problem to complete. The updated tool means they get better error messages and can use the integrated step-by-step debugger for when they have logic errors to solve. I recommend demonstrating one of those (like exercise 35)
Section 4: Writing Code
2-3 lessons
This is challenging and kids will need support- Pair programming is great here. The video gives three examples of working through three of the problems of increasing difficulty. You can easily scaffold by watching each exercise, working through each one with the kids and answering any of their queries or issues and then letting them do another couple on their own. Keep the Pseudocode code comments! Also, the tests that fail are great ways to use the step-by-step debugger to debug the code and work out what went wrong. Honestly its worth getting one wrong deliberately so you can show the tool and arm them with the ability to debug properly.
Section 5: Challenge
6-7 lessons
The video goes through the whole process of applying ALL that we have learned to plan, develop and test a really simple Maths Quiz. You can either demo it all yourself or play the video (I do) then code each part with the kids answering question and helping them through hurdles along the way (we do). This should take 3 lessons and prepare them to do the "you do" part without too much support. The curriculum requires that they plan, write and test code so these lessons are the main way that students show they are able to meet to the curriculum requirements.
When they are complete, they have a challenge to make something very similar on their own (you do). Both these come with a minimal "development log" for them to complete to evidence their planning, coding and testing. And both have extension opportunity so kids who are confident can take their programs further.
This can be used as a final assessment and should take 3 or 4 lessons. You may need to adjust the time to your students needs. This could also be done as a pair programming exercise if it suits your needs.
This can be marked and used as a final grade.
nb: All timings are approximate and for guidance only. Adjust times as required. If you are short of time, drop the final quiz and get them to hand in the Maths Quiz completed.
Coding puzzles to test your skills.
Goes from beginner to intermediate and is a good intro to programming competitions
This website is used as a recruitment tool for Google and Microsoft! Tackle some real brain-bending problems in Python and maybe even get on the global leaderboards.
The ultimate challenge for programmers.
The Home of competitive programming. Use the "Train" section to try out some of the questions from past NZ and international competitions.
W3Schools is one of the best places to go for an in-depth tutorial and reference for programming in Python.
Learning to program in Python is hard and you are going to have to persevere.
Read the tutorials, try it in in the "Try it yourself" boxes and experiment with each one to help you get a better understanding of each topic.
This is a cool way to learn programming that teaches you Python programming through setting challenges inside a game.
Code Combat is free (up to a point) so you can work through at home too!
Use your school email to create an account, and if you are lucky, your teacher will set up a classroom and you can compete against the others in the class to get the highest score!
This is an easy to watch and follow along tutorial to learn Python.
Mosh takes you from complete beginner to expert in an hour.
Well worth watching if you have never programmed before. But it is an hour long!!
If you are struggling with understanding programming watch this for homework!!