The resources we listed are for groups of 3 students.
Students will be able to:
Who designs programming languages for computers?
The resources we listed are for groups of 3 students.
Today we are going to write our own unplugged fitness app. Before we start we need to design a programming language so that we know what to do.
Brainstorm as a class all the different fitness exercises you could have in your programming language.
Ideas to get you started include:
Work in your groups draw on each of the cards. You should design:
Now place your cards in a row with the GO card first, then with each picture and how you should finish last. (There should be no numbers to indicate how many times you should do the exercise - that will come later.)
Each group goes around and tries to work out what each of the cards mean from the other groups.
Come together and discuss what was the same and for which cards you had to “learn” because you weren’t sure what it was?
This is the same with computer programming languages. You can learn to program with different languages, and some things seem similar in a new language, while other things you have to learn as it isn’t clear how to use a particular command.
Now put out 6 whiteboards and the hula hoop like this:
Have one group put their Go card on the first whiteboard
Now have them put their exercises cards out on the whiteboards shown. Explain that whatever is in the hula hoop will be repeated (it's a loop!)
We need to set the parameters. A parameter tells us how long to do something or how many times to do something. Here we know to Go, To do star jumps (but not how many), to do ski jumps (but not how many), to catch a bean bag (but not how many) and that we should repeat the ski jumps and catch a bean bag, (but not how many times)!
With your whiteboard pens, write in the number of times each exercise should be done. (Encourage the students to choose realistic numbers; the number on the hula hoop multiplies the ones inside.) For the exercises in the hula hoop, you need to repeat both of them how many times? (In the example, the sequence of 10 ski jumps and 5 catches is repeated 3 times, so it would be 10 ski, 5 catch, 10 ski, 5 catch, 10 ski, 5 catch).
The last piece of programming is to show how we will end when we have finished our fitness app workout.
Now we have built up our fitness app, it’s time to test it. The Programmer watches to see if everyone is doing it correctly. The Tester is looking for if there are any numbers to change or if the activities need further instructions. When the Tester says “Go” start following your fitness app.
The Programmer asks the Tester if they saw anything they thought could be changed or improved?
Getting the sequence right for programming is very important. If any detail is missing then your program won’t run how you expected it. A loop in programming is when you repeat the instructions inside of it, until a certain condition is met (in this case each exercise is completed a certain number of times). A loop can get a lot of instructions to happen with a relatively short program.
Throughout the lessons there are links to computational thinking. Below we've noted some general links that apply to this content.
Teaching computational thinking through CSUnplugged activities supports students to learn how to describe a problem, identify what are the important details they need to solve this problem, and break it down into small, logical steps so that they can then create a process which solves the problem, and then evaluate this process. These skills are transferable to any other curriculum area, but are particularly relevant to developing digital systems and solving problems using the capabilities of computers.
These Computational Thinking concepts are all connected to each other and support each other, but it’s important to note that not all aspects of Computational Thinking happen in every unit or lesson. We’ve highlighted the important connections for you to observe your students in action. For more background information on what our definition of Computational Thinking see our notes about computational thinking.
Many of the Computational Thinking connections in this lesson are the same as for lesson 1 and 2, so we have just included the additional ones specific to this lesson.
Students were specifying and following an algorithm with a programming language that they create. When they were creating their programming language they would have had to think about the algorithms they were going to be writing with these instructions, and figure out what types of instructions they would need.
Did students recognise that the instructions should be followed left to right? Were they able to interpret the loop correctly?
The symbols on the cards represented the physical actions students needed to perform; they were an abstract representation.
Were the students able to work with the symbols?
The hula hoop represents a compound action, as the cards inside it were a sub-list of actions that could be thought of as a single action that is composed of the sub-actions.
Were students able to decompose the actions into the two inside the loop, and then repeat that sub-sequence of instructions multiple times?
Placing a number beside an action indicated how many times it could be done, which is a concise representation of a pattern. For example, the actions "jump, jump, skip, jump, jump, skip, jump, jump, skip" make a pattern that could be represented as 3 lots of (2 jump, 1 skip).
Did students get the sequence of actions correct i.e. perform the two actions inside the hoop in sequence, then repeat that pair of actions multiple times based on the general case?
In this lesson students could evaluate their program by calculating how many steps would need to be performed to complete it. In the example there are 10+5 = 15 actions in the hoop, and it is repeated 3 times, giving a total of 45 actions. Including the first 5 star jumps, there was a total of 50 actions.
Did students recognise that the total number of actions could be worked out by adding the numbers in the loop, and multiplying them by the number on the loop? Could they work out the total number of actions by adding the other instructions outside the loop to that total?
When students encounter bugs in their programs they will need to logically step through their instructions one by one to locate the bug. They will need to think about what they expect to happen when each instruction is followed, and if they do not get the result they expected they will need to identify what went wrong, why it went wrong, and how to fix it. This requires students to apply their logical thinking skills
Do students go through their instructions and predict what will happen each time one is executed? When they debug their instructions do they use a logical method to do this? Such as stepping through each instruction one by one and checking if what they expected to happen does happen, or comparing their program to previous version which didn’t seem to contain a bug?