Teaching coding using the PRIMM model (secondary)

Learners need to learn not only how to write programs, but to read and understand them, and I think the PRIMM model,  a structured approach to teaching programming can support both students and teachers. Furthermore, the model can be applied to a range of different year levels from junior primary right through to secondary and applied to a range of programs (ie Scratch Junior, Bee Bots, Scratch, Dot and Dash, Python ect).

Below I have outlined what PRIMM stands for and given some examples. Please note, the examples do not necessarily follow on from each other, they are simply examples of exercises to help explain the stages of the PRIMM model.

Predict: These activities encourage students to look for clues in the program that suggest what its function is.

Example 1: Here is some Scratch code, write what will happen.

 

 

 

 

 

Example 1: Here is some Python code.

flowers=5
trees = 5
plants = flowers+trees
trees=20
print (plants)

What will be printed on the screen? a) 25 b) 15 c)20 d) 5

Run: Generally involves downloading a piece of code from a shared area to check against student’s predictions. However, I like to adapt this phase and actually get students to type in code themselves (as long as it isn’t too long) and then run it to check their prediction.

Investigate: This involves lots of different types of activities such as answering questions about a program, labeling particular concepts etc. Example:

 

 

 

 

“1.What would happen if the program used the word Print() instead of print() ?
2.What would happen if you type “Yes” instead of “yes” or “no” when running the program? (try it and see)
3.What is def used for?
4.Why does the program include conversation() at the bottom of the program?”(source: King’s College London).

Modify: Students are given a working piece of code and challenged to add a variety of modifications.

Example: Modify the above program under ‘investigate’ to have a conversation with somebody about food.

Make: Once students are confident in modifying the program that you have created, they can create their own program.

Example: Hi Low Game using Python.
How to play: The teacher thinks of a number between 1 and 100. Students take it in turns to guess the number. When a student guesses the number, the teacher says ‘too high’, ‘too low’ or ‘you guessed it’. Students then play in small groups. Once students understand the concept, they write a program to play the game using Python.

I am using this model with my Year 9 class this semester and hope to rewrite some of my Year 5 Scratch program so that it utilises this model in greater depth. However, as I coordinate 10 year levels, this is currently on my to do list 😉 .

Leave a Reply

Your email address will not be published. Required fields are marked *