Menu

Problem Solving and Modelling

4.1

Menu

Intro

When you discuss the new Framework with primary teachers, they always talk about coding, often in a slightly fearful voice. They imagine a black screen full of gibberish code, and wonder how on earth they are supposed to teach it to their 10 year olds. But the term coding doesn't even appear in the Framework! What does appear is this element - 'Problem Solving and Modelling'.

This element involves identifying a problem, breaking it down into manageable parts, spotting patterns and solving the problem. 

We use coding as one way to teach the skills of this element, but there really is no need to fear it. Problem Solving and Modelling is fun, and considerably simpler than you've been imagining. Bee-Bots, Logo, writing instructions - these are things you've been teaching for decades, and the simple coding activities listed below are only an extension of these skills.

Framework

4.1 - Problem solving and modelling

  • design simple sequences of instructions (algorithms) including the use of Boolean values (i.e. yes/no/true/false), e.g. within the algorithm, demonstrate the correct use of Boolean values giving an either/or response.

Skill by Skill

  • Write a real world algorithm to represent a sequence of instructions using loops or procedures and Yes/No splits (Boolean Values).
  • Understanding the meaning of flow chart symbols.
  • Using a simplified programming environment, program several sprites to move on command in different directions and at different speeds.
  • Debug code to identify errors when trying to make several sprites move in different directions and speeds in a simplified programming environment.
  • Independently create a character, number or text that repeat an action when text is entered.
  • Using a simplified programming environment, add several buttons to different sources such as websites.
  • With support, follow pre-made instructions to create a simple animation or game using full visual programming on a program such as Kodu or Scratch.

(EAS ICT Skills Framework)

 

Vocabulary

 sprite     background     debug     error     correct     loop     repeat     boolean     input

Activity 1

The Boolean Bot

Just as in previous years, we start with some paper based problem solving. Pupils write instructions for a 'robot detective' to find the right key to open a safe. This activity builds on the Year 3 and 4 Robot activities, so make sure your pupils have been taught those first before they attempt this one.

Boolean flow charts

Prepare:

  • Create a video or image of a robot detective for the pupils to help. This robot detective can take many forms, depending on your preference:
    • A Yakit Kids or Tellagami talking video explaining his problem.
    • A life size drawing on your display wall.
    • A special hat that you can place on any pupil to turn him/her into the robot detective.
  • Find A3 paper!
  • Fill some example flow charts that have a Boolean question, i.e. a Yes/No question where the code diverges depending on the answer (see examples in the image opposite).
  • Get hold of a padlock (with key) and a range of other keys.

Activity Tasks:

  1. Introduce your robot detecitive to the class. Explain that we are trying to code a robot that can test out each key until it finds the correct one to open the padlock.
  2. Draw a simple flowchart code with a back-to-start loop (Pick up key -> try in padlock ->put down key -> Back to start). What's wrong with this code? Hopefully a pupil will note that if the first key is correct, the robot will continue to try the other keys, wasting time.
  3. Show them the example codes to introduce the idea of a Boolean question.
  4. Remind them that flowcharts have simple language and clear instructions that take us from one step to the next.
  5. Point to the few lines of code before the Boolean element (i.e. the things that only happen at the start) and after the Boolean element (things that only happen right at the end)
  6. Hand out A3 sheets and have the pupils create a flow chart to write their code for opening the padlock. The more concise the better. More able pupils can be encouraged to limit themselves to 3 words per instruction.
  7. Have one child act as the robot to 'test out' the codes, with pupils reading their codes step by step to him.
  8. Ask them to write the code again, but this time imagining there are three padlocks to be opened (still with 5-10 possible keys). Hopefully they will keep their original code but now add a loop so that the actions repeat for padlock 2 and 3.

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.

Success Criteria

  • I can write my instructions in a  flow chart for another child to follow.
  • I can combine a Boolean question and a loop in my code.

Other Framework Elements

3.3 - Evaluating and Improving

Your usual peer-assessment and/or self-assessment.

Vocabulary

code     robot     flow chart     symbols     looping     repeating     boolean

Variation Ideas

You could obviously teach this activity without introducing a robot child, but where's the fun in that!

Activity 2

Debug my Sprite

An important skill at this level is debugging errors in software. This skill has been mentioned often in earlier years, and should be revisited as often as possible. In this example the pupils are given a set of codes for a race between a pig, dog and snail. They must find the errors in the code, correct them and then create their own race.

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 Race activity available on the Scratch Jr website (click here).
  • Copy the code for the race activity, but amend a few bits so that your new code has errors (e.g. make the dog move 10 steps instead of 15, make the pig go fast)
scratch jr race

Activity Tasks:

  1. Show an image of the race to the pupils, and then your error strewn codes. Explain that the code creates the race in Scratch Kr, with the dog winning, the rabbit second and the pig last. Tell them to correct any errors they encounter when copying the code.
  2. Pupils use the codes to create the race, exactly as it was on the original activity card (correcting the errors as and when they spot them).
  3. Now ask the pupils to create another race, this time between three objects moving vertically from the bottom of the screen to the top.
  4. For an extension, ask the pupils to add code to the winner, showing how they celebrated their win, and to the loser showing how upset they are.

Remember

  • Pupils will not be ready for this activity unless they've had the Coding experiences in previous years. In the first few years of implementing the Framework, do check this and consider doing activities from previous years first.
  • If you want other codes to use as further practise, go to the Scratch Jr website and amend any of the codes on their Teach page: Click here to see their examples

Success Criteria

  • I can find and debug errors in a code
  • I can make multiple sprites move at different speeds and in different directions

Other Framework Elements

3.3 - Evaluating and Improving

Your usual peer-assessment and/or self-assessment.

Vocabulary

code     sprite     debug     errors     vertical     horizontal     

Variation Ideas

This is a simple activity. Don't vary it too much. However, if your pupils achieve it with ease and you'd like to further challenge them, look at the link in the 'Remember' section.

Activity 3

Costume Change

Superhore Scratch

Your pupils will have some experience of a full coding environment from their Year 4 work with the colour changing cat. They will now extend their skills by creating a room full of items that change depending on what you type.

Prepare:

  • Create an account and familiarise yourself with a visual Coding software. Scratch is highly recommended and free online. (Another option is J2Code which is part of J2E)
  • Practise the activity your pupils will be doing by following the step by step instructions yourself.

Activity Tasks

  • Remind pupils how to build simple code in Scratch (See Year 4 Chameleon Cat Coding activity)
  • Show them your model Costume Change, pointing out the simple code that makes it happen.
  • Ask your pupils to log into Scratch, start a new activity and add three characters.
  • Show how to create a second costume for the characters, turning them into superheroes.
  • Explain how broadcasting works in Coding (see the video above).
  • Give the pupils the basic codes in the link above, and model how to use them to make the game ask a question and then to change a character's costume depending on the answer.
  • Pupils can now create their own superhero changing game, adding a background at the end.

Remember

  • If you have very confident coders in your class, give them an extension activity by asking them to think of other ways of using costume changes in a code (e.g. a witch turning people into animals).

Success Criteria

  • I can code sprites to react to text inputs.
  • I can change sprites' costumes.

Other Framework Elements

3.2 - Creating

You are creating an interactive animation.

3.3 - Evaluating and Improving

Your usual peer-assessment and/or self-assessment.

Vocabulary

code     sprite (character)     blocks     instructions     scene     costume     broadcast

Variation Ideas

You do not have to stick to the superhero theme. This activity works with any costume change (e.g. a dormant volcano into an erupting volcano, a seed into a flower, an iceberg into a puddle).