Problem Solving and Modelling
4.1
Activity 1
The Robot Child
You may expect a coding activity to start with an iPad or a computer, but 'Problem Solving and Modelling' expects more than that so we start without a single piece of technology. Pupils write 'Codes' for all kind of daily activities to help a robot child complete his daily chores.
Prepare:
- Create a robot child for the pupils to help. This robot child can take many forms, depending on your preference:
- A Yakit Kids or Tellagami talking video
- A life size drawing on your display wall
- A special hat that you can place on any pupil to turn them into the robot child.
- Create flow chart templates for the pupils to write on.
- Fill an example flow chart for serving a bowl of cereal.
Activity Tasks:
- Introduce your robot child to the class. Explain that he wants to behave like a real boy/girl but does not know how to accomplish normal, everyday tasks like brushing his teeth, making sandwiches or even simple morning school tasks like putting away his coat and lunchbox, handing in homework or sitting down.
- Explain to the pupils that they need to write codes for the robot child to achieve all these tasks. Show them an example code for serving a bowl of cereal, set out in a flow chart.
- Highlight the simple language, clear instructions and the fact that a flow chart takes us from one step to the next.
- Hand out blank flow chart templates and have the pupils write their code for the other tasks discussed. The more concise they are, the better. More able pupils can be encouraged to limit themselves to 3 words per instruction.
- Have one child act as the robot to 'test out' the codes, with pupils reading their codes step by step to him.
Remember
- Flow chart instructions should be kept simple and should be easily followed without the need for context.
- There is no need for full grammatical sentences in their flow charts. Coding requires simplicity and clarity.
Activity 2
Debugging and Looping
Debugging is an important skill that needs to be practiced as often as possible. It involves three key steps that need to be taught:
- Reading Code
- Finding the error
- Correcting the error
This activity focuses on all three, and takes a look at Loops (repeating code)
Prepare:
- Familiarise yourself with a simple Coding game such as BeeBot, Kodable or 2Go on Purple Mash.
- Write down solutions for each level on a worksheet, but put in one or more deliberate errors (e.g. turning right instead of left, moving 5 steps instead of 4)
Activity Tasks:
- Let the pupils familiarise themselves with your game of choice (they will probably know it from previous years).
- Tell them that you've prepared a 'Cheat Sheet' with answers to every level in the game. Hand out your error strewn answers.
- Ask the pupils to follow your 'Cheat Sheet' for a particular level. When the code fails, act surprised and embarrassed, asking them to work out what you did wrong.
- Have them correct all your codes.
- Show them a code for a car driving around a track (e.g. Forward 5, Turn Right, Forward 5, Turn Right, Forward 5, Turn Right, Forward 5). Is there a repeating pattern? How can we make this code simpler? (Repeat 4 times (Forward 5, Turn Right).
Remember
- The pupils should be used to the Coding apps from previous years (Do check this and consider first doing activities from previous years if this is not so).
- Keep practicing these skill often. There's no need for a worksheet every time, just write codes on the whiteboard that, for example, guide pupils from the whiteboard to the door. As long as you put in deliberate errors, it will keep their debugging skills sharp!
Activity 3
Coding an Animation
Finally it's time for the pupils to really feel that they are coding by creating an animation code. This activity requires a simple coding app or software that gives you the freedom to code as you like. Scratch Jr on the iPad is highly recommended (and free)!
Prepare:
- Download a simple coding app that gives you freedom to code as you like (Scratch Jr is highly recommended).
- Familiarise yourself with the app before introducing it to your class. Have a go at the basketball activity from the Scratch Jr website.
Basketball Activity - from www.scratchjr.org
Activity Tasks
- Introduce the pupils to the app, showing them how to create a simple code for your sprite (character). Every code needs to start with a green flag, and a simple code just adds a few blue moving tiles to the green flag. (Watch the video below for a simple demonstration.)
- Let the pupils make their own codes for their character, sticking to a green flag and a few blue tiles.
- Make a code with some repeating instructions in the middle (e.g. Forward, Forward, Forward, Right, Forward, Right, Forward, Right, Forward, Forward). How can we simplify it? Use the orange repeat button to repeat Forward, Right three times.
- Ask them to add a background of a city and a road. Let them try to find the correct button before you ask a successful child to show the rest.
- Give them instructions on how to add characters and ask them to code each character to move differently, including some repetitions.
- Give them instructions to animate the cat playing basketball (see above button) and ask them to create the animation and then add and code additional characters such as a crowd cheering.
Remember
- There are very specific skills to be taught here (see the skill by skill at the top of the page). Make sure the lesson focuses on these skills.
- The video demos below guide you through this activity in detail.