What can the students remember about sequence, selection and repetition from week one (the Hour of Code activities)?Can they define these terms?Can they provide illustrative examples of selection and repetition?
Explain that students will need to use a variable today to store a user’s score when developing a game in Scratch
Explain that a variable is a container that stores data. It is like a labelled box that allows you to store things and retrieve them later. The label is important because it enables us to identify the box later so we can retrieve the right data.
Point out these useful learning resources on the Scratch wiki.
Pic shows children playing Scratch ‘Operation’ game. Point out that this involves use of inputs (the tweezers, which are connected to the computer via a MakeyMakey) and outputs (what happens on the computer screen).
Get the students to make lists of various forms of input and output. It could help to get them to think about their smartphones (e.g. screen – which is both an input and an output in the case of touch screens – physical buttons, speaker, microphone, accelerometer, gyroscope…).
Devote half of session to team debug task but before doing this make sure you show the Pong game to the whole group and discuss what is already working and what could be done to improve the game.Also get the students to look at the code with you and identify which bits of code do what. Can they identify an example of selection? Can they identify an example of repetition?Discuss how you might add a score to the game. Show where to find the option to create a variable. Show them the blocks for interacting with variables. Ask where exactly in the code they would add a block to increment the score?
EI607 Session 4 Key Computational Concepts
KEY COMPUTATIONAL CONCEPTS
1. Develop a deeper understanding of sequence, selection
2. Develop an understanding of variables
3. Develop an understanding of inputs and outputs
COMPUTING - KS1/KS2
Key stage 2
Pupils should be taught to:
design, write and debug programs that accomplish specific goals,
including controlling or simulating physical systems; solve
problems by decomposing them into smaller parts
use sequence, selection, and repetition in programs; work with
variables and various forms of input and output
use logical reasoning to explain how some simple algorithms work
and to detect and correct errors in algorithms and programs
understand computer networks including the internet; how they can
provide multiple services, such as the world wide web; and the
opportunities they offer for communication and collaboration
use search technologies effectively, appreciate how results are
selected and ranked, and be discerning in evaluating digital
select, use and combine a variety of software (including internet
services) on a range of digital devices to design and create a
range of programs, systems and content that accomplish given
goals, including collecting, analysing, evaluating and presenting
data and information
use technology safely, respectfully and responsibly; recognise
acceptable/unacceptable behaviour; identify a range of ways to
report concerns about content and contact.
“USE SEQUENCE, SELECTION
& REPETION IN PROGRAMS”
WHAT ARE VARIABLES?
“Variables work like labelled boxes that allow you to store things
inside them to retrieve later.”
Fundamentals of Programming: Variables http://goo.gl/D7etz
VARIABLES IN SCRATCH
For details of using variables in Scratch (including the difference
between Global and Local variables) read:
INPUT & OUTPUT
What other forms of input and output can you think of?
Think of the various
digital devices you use.
Working in pairs:
1. Find ‘Pong Debug Activity’ (you can just search for this)
2. Read and follow the instructions shown next to the game
(NB: you will need to scroll the Instructions text)
3. Make sure you save and share your project/s before you
„Don‟t fall into the trap of thinking that as you have used selection in
one program that you have covered this. This is like using addition
once and then thinking that you don‟t need to use it again. Selection,
repetition, variables are constructs you could take a lifetime to learn
how to manipulate. Pupils need multiple opportunities to use and
experiment with these ideas. The new English Computing program
[sic] of study talks about, “repeated practical experience of writing
computer programs” in the aims, lets [sic] work towards this.‟
Phil Bagge „How I teach programming to 7-11 year olds using Scratch‟
FOLLOW UP TASK
Read the following article.
Brennan & Resnick (2013) “New frameworks for
studying and assessing the development of computational