0% found this document useful (0 votes)
16 views15 pages

L1 Slides - Using Loops To Create Shapes - Y4

This lesson focuses on using count-controlled loops in programming to create shapes, specifically in Scratch. Students will learn to list instructions with repetition, predict code outcomes, and modify code snippets. The lesson culminates in programming various shapes using loops and event blocks.

Uploaded by

info
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views15 pages

L1 Slides - Using Loops To Create Shapes - Y4

This lesson focuses on using count-controlled loops in programming to create shapes, specifically in Scratch. Students will learn to list instructions with repetition, predict code outcomes, and modify code snippets. The lesson culminates in programming various shapes using loops and event blocks.

Uploaded by

info
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Lesson 1: Using

loops to create
shapes
Year 4 – Programming – Repetition in games
Objectives

Lesson 1: Using loops to create shapes


To develop the use of count-controlled loops in a different
programming environment

● I can list an everyday task as a set of instructions including


repetition
● I can predict the outcome of a snippet of code
● I can modify a snippet of code to create a given outcome

2
Introduction

Lists of instructions

I need to finish my dinner if I


want to have dessert. I have five
forkfuls left. What do I need to do
to complete this task?

Eat food
}
Put food on fork

Put fork in mouth Repeat five


times

3
Introduction

Lists of instructions

You drop ten pencils on the floor.


You need to pick up all ten pencils
and put them back into the pot.

On your whiteboard, write a list of


instructions for how to do this.

Think about which steps are


repeated, and how many times
you need to repeat them.

4
Introduction

Lists of instructions

Put in pot }
Pick up pencil
Repeat ten
times

5
Activity 1

What will this code snippet do?

6
Activity 1

What similarities can you see in these code


snippets?
Logo code Scratch code

repeat 4 [fd 50 rt 90]

7
Activity 1

Code blocks in Scratch

Use the Logo code snippets on


the ‘Code blocks in Scratch’
worksheet to help you complete
the Scratch code snippets.

8
Activity 2

Rearranging Scratch blocks

Using the Scratch file, rearrange


the blocks to program a triangle.

Complete the values in the


blocks.

Press the T key to check that


your triangle works.

9
Activity 2

Exploring other shapes


When you have written your program to draw a triangle, try writing
programs to draw the other shapes on the sheet. Use the first letter of
each shape name as the event block to start each shape being drawn,
eg ‘when h is pressed, draw a hexagon’.

1
0
Activity 2

Using letter keys as event blocks to draw


shapes

1
1
Plenary

Which image would running this code snippet produce? Why?


1
2
Assessment

How confident are you? (1–3)

● I can list an everyday task as 3 – Very


a set of instructions including confident
repetition
● I can predict the outcome of a 2 – Unsure
snippet of code
● I can modify a snippet of
code to create a given 1 – Not
outcome confident

1
3
Summary

Next lesson

In this lesson, you… Next lesson, you will…

Programmed in Scratch to create Use forever loops in your


a square using a count-controlled programming
loop, and used what you know
about Scratch to program other
shapes

1
4
Attribution statement

● This resource was created by Raspberry Pi Foundation and updated


by STEM Learning for the National Centre for Computing Education.
● The contents of this resource are available for use under the
Open Government License (OGL v3) meaning you can copy, adapt,
distribute and publish the information. You must acknowledge the
source of the Information in your product or application, by
attributing Raspberry Pi Foundation and STEM Learning as stated
here and are asked to provide a link to the OGL v3.
● The original version can be made available on request via
[email protected].

You might also like