There was an error in this gadget

Sunday, 8 March 2015

Unplugged Variables

For the last few years, when teaching variables to key stage 2 pupils, I've mainly focused on scoring systems, timers, lives etc in Scratch games and introduced the concept as a value that is changed. This sat well with children's scientific understanding of the word and was readily accepted.

When ICT evolved into Computing, and variables were mentioned explicitly in the key stage 2 program of study, I thought my explanation of the concept needed to be more accurate. Below is the basic explanation that I give to children and some unplugged activities that can be used to introduce the concept.

Variables are places in computer programs that data can be stored. This data can be changed, recalled or used as required. The variable can only contain one value at a time. Data in variables can be represented as numbers, statements, dates etc. 

Where's the Variable?

As a class we looked at a range of images showing variables in software applications and in other forms like calendars and scoreboards. We identified the variable(s) and discussed when they would change - when a piggie is destroyed increase score variable by 500 (angry birds).

Comparing Variables

I used this activity to support programming a game to identify the winner when a points system is used. The scoreboard from a soccer game gives plenty of paired variables that can be compared. Using these values, we decided which team had scored the most goals, had the most corners, made the most saves. Then we discussed how to write an algorithm that would compare the values and state who the winner is (we found it useful to give pairs of variables names - saves 1 & saves 2). Example if saves 1 > saves 2 then say "Team 1 Winner"; if saves 1< saves 2 then say "Team 2 Winner". If saves 1 = saves 2 then say "Draw no winner"

Guess Who

In this activity we used the statements true/false to create facts about Guess Who characters.
First pupils had to identify the characters from the information given.
Glasses: True
Hat: False
Blonde Hair: True
Moustache: False

Once this understanding was secure, the children used the full set of characters to create variable statements to describe other characters. They then swapped statements and worked out who the statements where describing.

Dice Games

The first activity required children to follow an algorithm to create a scoring game using dice. After playing the game and discussing what certain parts of the algorithm meant, they were then challenged to design their own dice scoring game and write an algorithm for it.

Whenever I use an unplugged activity, I attempt to match the language used in it to the predetermined vocabulary and syntax of the programming language we are using and, with variables, the way the concept will be used. Some of these activities attempt to mimic Scratch, others text-based languages. 

No comments:

Post a Comment