You are on page 1of 11

Slide 1

Computing Scheme of Work


Unit 6.1 - Coding

Lesson 4:
Flowcharts and Control Simulations

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 2

Aims
To use flowcharts to test and debug a program.
To create a simulation of a room in which devices can be controlled.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 3

Success Criteria
Children can follow flowcharts to create and debug code.

Children can create flowcharts for procedures.

Children can be creative with the way they code to generate novel visual effects.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Vocabulary Overview
Slide 4

Words encountered previously New in this lesson


Predict: Use your understanding of a situation to say what will Flowchart: A diagram that uses specifically
happen in the future or will be a consequence of something.
shaped, labelled boxes and arrows to represent an
Debug\ Debugging: Fixing code that has errors so that the code algorithm as a diagram.
will run the way it was designed to.
Run\Execute: Clicking the Run button to make the computer Simulation: A model that represents a real or
respond to the code. Execute is the technical word for when you run imaginary situation. Simulations can be used to
the code. We say, ‘the program (or code) executes.’ explore options and to test predictions.
Object: Items in a program that can be given instructions to move
or change in some way (action). In 2Code Gorilla, the object types Procedure: An independent code module that
are button number, input, text, shape turtle, character, object, car, fulfils a task and is referenced within a larger body
animal and hotspot. of code. In 2Code a procedure might be coded as a
Tabs: In 2Code tabs are used to organise code. function.
Function: A block or sequence of code that you can access when
you need it, so you don’t have to rewrite the code repeatedly.
Instead, you simply call the function each time you want it.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 5

Vocabulary
What does this word mean to you?

Simulation

Can you remember learning about simulation in Year 5 Coding lessons?

A simulation is a model that


represents a real or
imaginary situation.
Simulations can be used to
explore options and to test
predictions.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 6

Billy’s Bedroom Flowcharts

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 7

Billy’s Bedroom Simulation


Let’s open Billy’s Bedroom Simulation and RUN the program.
Does it contain all the same things as your picture?

Look at the flowcharts while the program is running, can you predict what will happen when different objects
are clicked on?

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Billy’s Bedroom Simulation
Slide 8

Let’s run the simulation again.


What objects shall we click on?
(Use the flowcharts to help you decide)
Does it run like you were expecting?

Look at the code.


It is incomplete.
Why is it organised into different tabs?
What is each tab for?

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 9

Activity 1: Complete Billy’s Bedroom Simulation


Open Billy’s Bedroom Simulation and add missing code or debug the existing code so that it runs correctly.
Interpret the flowcharts and program the correct procedure for each object.
Create flowcharts for, and then program objects that there isn’t an existing plan for.
Don’t forget to save as you go – if you make a mistake you can exit without saving and then
re-open your program at the last point you saved it.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Lesson Vocabulary Overview
Slide 10

Predict: Use your Object: Items in a program that can be


understanding of a situation to Debug\ Debugging: Fixing code given instructions to move or change in
some way (action). In 2Code Gorilla, the
say what willPredict
happen in the future Debug\
that has Debugging
errors so that the code will Object
object types are button number, input, text,
or will be a consequence of run the way it was designed to. shape turtle, character, object, car, animal
something. and hotspot.

Simulation: A model that Procedure: An independent


Flowchart: A diagram that uses represents a real or imaginary code module that fulfils a task
specifically shaped, labelled boxes and is referenced within a larger
and arrows toFlowchart
represent an algorithm
Simulation
situation. Simulations can be Procedure
body of code. In 2Code a
used to explore options and to
as a diagram. procedure might be coded as a
test predictions.
function.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware
Slide 11

Review Success Criteria


I can follow flowcharts to create and debug code.

I can create flowcharts for procedures.

I can be creative with the way I code to generate novel visual effects.

Need more support? Contact us:


Tel: +44(0)208 203 1781 | Email: support@2simple.com | Twitter: @2simplesoftware

You might also like