Computing in the Classroom – Linking on and offline

The objectives in the curriculum specify that students learn coding – coding being a language that is needed to program computers.Alongside teaching coding and the terminology that goes with it, is understanding computational thinking and how this relates to coding.The first blog post under this category of Computing in the classroom focussed purely on offline activities. Offline, sometimes called unplugged,is essential in ensuring that students do not thinking of computational thinking as purely coding and vice versa.

In this post, I wanted to look at an example of how to relate offline 
activities to block coding.

 ‘use sequence, selection, and repetition in programs; work with variables and various forms of input and output’

The KS2 computing objective above includes the term selection which we’re going to look at. Selection is about knowing what to do in different situations. So computers have to be programmed in order for them to make a selection or choice.  Words like if, then and else are used to help with this programming.

Online first.
In Discovery Education Coding, Unit 3b has lessons on adding if statements.

Computing blog post coding image 1

The step called Two fish requires you to add code to make the octopus eat the puffer fish when it hits them.

Computing blog post coding image 2
I was talking to a student about if statements and asked if they could think of where selection featured outside in an offline context. They came up with cops and robbers.

The game (if you don’t have it in your playground currently) goes like this:

There’s a jail, some robbers and some cops. There’s more robbers than cops. If 10 people are playing maybe 3 or 4 cops and the rest are robbers. The cops defend the jail while also trying to go out and catch the robbers. For the cops the object is to catch all the robbers, and for the robbers the object is to stay out of jail and free any fellow robbers in jail.

So the if statements would be:

If the cop taps a robber, the robber has to go to jail.
If a free robber taps a jailed robber then the jailed robber is freed.
If all the robbers are in jail then the cops win.
If one of more of the robbers are outside of the jail the robbers win.

You could play the game in groups and ask the students to write the if statements.

Questions that could then be investigated:

  • What happens if when the cop tags a robber, another robber has to go into jail?
  • What is the effect of boys tagging only boys and girls tagging only girls?
  • Would the game still work if another if statement were added? What could this be?
  • How could these be written as if statements?
  • Ask students to come up with their own investigations, or if statements based on the game.

The student I spoke to came up with the problem when they play:

‘The problem is if two cops come out that only leaves one guarding the jail which means that it’s easier for the robbers to free their fellow robbers.’

This could be the basis for an if statement to be investigated.

Hint/Tip? Of course, if you are relating concepts in coding to offline activities across the curriculum, it actually matters less if students have seen the block coding activity before. It shouldn’t be about them just going through the activity. If you do have Discovery Education Coding, each unit has step called Your own app to enable students to apply knowledge from without the unit, this is great for consolidation.

The next post will be part 2 relating on and offline.

I hope this has been useful, we’d love to hear from you about how coding is going in your school.


Related posts