16
Computational thinking and programming key stage 2

Ei607 getting started with programming

Embed Size (px)

Citation preview

Page 1: Ei607 getting started with programming

Computational thinking and programmingkey stage 2

Page 2: Ei607 getting started with programming

Subject content for KS2

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

Page 3: Ei607 getting started with programming

Decomposing problems

“solve problems by decomposing them into smaller

parts” - Subject content KS2

Decomposition is the process of breaking a problem

down into smaller problems so that ultimately the

bigger problem can be solved (and explained clearly to

someone else or to a computer).

Page 4: Ei607 getting started with programming

Sequence, repetition &

selection“use sequence, selection, and repetition in programs” - Subject

content KS2

Sequence: putting instructions in an order where each one is

executed one after the other

Repetition: one or more instructions are repeated a number of

times or until a condition is met or the program is stopped

Selection: instructions are executed depending on whether a

particular condition is met

Selection lies at the heart of the ‘intelligence’ of a computer

program.

Page 5: Ei607 getting started with programming

Activity #1 Hour of Code

Working in pairs, follow the Hour of Code beginners

tutorial. Your challenge is to complete this in 30 mins!

http://learn.code.org/hoc/1

NB: This tutorial introduces the key programming

concepts of sequence, repetition and selection

Page 6: Ei607 getting started with programming

Debugging at KS2

“design, write and debug programs that accomplish

specific goals” - Subject content KS2

This builds upon children’s experience of debugging at

KS1. As their programs become more sophisticated

the debugging becomes more challenging.

Page 7: Ei607 getting started with programming
Page 8: Ei607 getting started with programming

Activity #2 Scratch Roamer

View the Simple Roamer project at

http://scratch.mit.edu/projects/33560452/. Click the

green flag to make the Roamer move.

Can you write a program to make the Roamer draw an

equilateral triangle? Click the ‘See inside’ button to get

started.

Page 9: Ei607 getting started with programming

Hungry Monkey

View the Hungry Monkey project at

http://scratch.mit.edu/projects/21416773/. Click the

green flag to play the game.

We’re now going to decompose this game into smaller

problems and you will learn how to program each

element.

Page 10: Ei607 getting started with programming

Activity #3 Hungry Monkey 1

http://scratch.mit.edu/projects/34307992/

Can you make the monkey sprite move left and right

when the left and right arrow keys are pressed?

Hint: you need to use a ‘forever’ block.

Page 11: Ei607 getting started with programming

Activity #4 Hungry Monkey 2

http://scratch.mit.edu/projects/34309136/

Can you make the monkey jump when the ‘up’ arrow

key is pressed?

Hint: you’ll need to use a ‘wait’ block.

Page 12: Ei607 getting started with programming

Activity #5 Hungry Monkey 3

http://scratch.mit.edu/projects/34311270/

Can you hide the bananas when the monkey grabs

them?

Hint: you’ll need to copy the code from Sprite1 to the

other banana sprites. To do this, drag the code stack

from Sprite1 onto each of the other banana sprites.

Page 13: Ei607 getting started with programming

Variables

“work with variables” - Subject content KS2

Variables are containers for data. They enable us to

store, retrieve or change data. A variable could be

used in a game to keep track of a user’s score or to

remember a player’s name.

Page 14: Ei607 getting started with programming

Activity #6 Hungry Monkey 4

http://scratch.mit.edu/projects/34312402/

Can you make the score board work so it keeps track

of the number of bananas the monkey has caught?

Page 15: Ei607 getting started with programming

Subject content for KS2

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

Page 16: Ei607 getting started with programming

Follow up from today:

Turvey K. et al. (2014) ‘Programming and

computational thinking’ in Primary Computing and ICT,

Knowledge, Understanding and Practice, London:

Sage.