lesson 1.5 – introduction to loops - marty the robot...lesson 1.5 – introduction to loops...

15
Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.4 Device Compatibility: Laptop, PC or Tablet Lesson Overview In this lesson, students will continue to build upon their programming knowledge with the introduction of loops. Students should be able to understand that they can use loops to reduce the number of lines of code that they have to write by the end of the lesson through using a combination of computational thinking and the Scratch editor. Learning Objectives Put together several lines of code blocks to get Marty to walk around in a specific shape Understand that we can reduce the number of blocks by using something called loops Using loop, write code blocks to get Marty to walk around in a specific shape Key Vocabulary Code blocks Loops Repetition Shapes Patterns Angles Resources & Equipment Marty the Robot Marty Workbook (Lesson 1) Paper/Pencils/Tape Laptops/Computers/Tablets Access to the Scratch editor Additional Reading Educator’s Guide Introduction to Programming with Marty using Scratch Learning Plan & Activities 1. Get students to split up into groups of 2-3 and ask each student to take a turn at pretending to be a robot whilst the other members in the team give their ‘robot’ instructions to walk around different shapes (using the tape or paper and pencils to draw out the shape to help with navigation) a. Remind students that there are only certain instructions that have been listed in their workbooks b. Start off with something simple like a square and gradually build up to something more tricky like a triangle 2. Staying in the same groups, set up the Scratch editor connected to a Marty device and ask students to program Marty to walk around in a square 3. Ask students to point out any patterns that they can see in their blocks of code 4. Introduce loops as a way to repeat blocks of code n times and get students to use this to re-program Marty to walk in a square 5. Now get students to think up some different shapes and see if they can program Marty to walk in that shape using a loop a. It might help students to draw out the shape and label the different angles that they will need to program that shape

Upload: others

Post on 17-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.4 Device Compatibility: Laptop, PC or Tablet Lesson Overview In this lesson, students will continue to build upon their programming knowledge with the introduction of loops. Students should be able to understand that they can use loops to reduce the number of lines of code that they have to write by the end of the lesson through using a combination of computational thinking and the Scratch editor.

Learning Objectives • Put together several lines of code blocks to get

Marty to walk around in a specific shape

• Understand that we can reduce the number of blocks by using something called loops

• Using loop, write code blocks to get Marty to walk around in a specific shape

Key Vocabulary • Code blocks

• Loops

• Repetition

• Shapes

• Patterns

• Angles

Resources & Equipment • Marty the Robot

• Marty Workbook (Lesson 1)

• Paper/Pencils/Tape • Laptops/Computers/Tablets • Access to the Scratch editor

Additional Reading • Educator’s Guide

• Introduction to Programming with Marty using Scratch

Learning Plan & Activities 1. Get students to split up into groups of 2-3 and ask each student to take a turn at pretending to be a robot whilst the

other members in the team give their ‘robot’ instructions to walk around different shapes (using the tape or paper and pencils to draw out the shape to help with navigation)

a. Remind students that there are only certain instructions that have been listed in their workbooks

b. Start off with something simple like a square and gradually build up to something more tricky like a triangle

2. Staying in the same groups, set up the Scratch editor connected to a Marty device and ask students to program Marty to walk around in a square

3. Ask students to point out any patterns that they can see in their blocks of code

4. Introduce loops as a way to repeat blocks of code n times and get students to use this to re-program Marty to walk in a square

5. Now get students to think up some different shapes and see if they can program Marty to walk in that shape using a loop

a. It might help students to draw out the shape and label the different angles that they will need to program that shape

Page 2: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Additional Challenges

• Students could design their own shape, draw it out and then program Marty to walk around in this shape and then challenge other student groups to try and program that shape

Curriculum Benchmarks Curriculum for Excellence – Technologies Benchmark Guide

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.5 Digital Literacy TCH 0-01a ●

Technological Developments in Society and Business

TCH 0-05a ●

TCH 1-07a ○

Craft, Design, Engineering and Graphics

TCH 0-09a ●

TCH 0-10a ○

TCH 0-12a ●

Computing Science TCH 0-13a ●

TCH 0-14a ○

National Curriculum – Computing, Design & Technology

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.5 Computing 1-e ○

Design & Technology

1.1-b ●

1.2-a ●

1.3-a ○

Australian F-10 Curriculum – Digital Technologies, Design & Technologies

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.5

Digital Technologies

ACTDIK001 ●

ACTDIK002 ● ACTDIP003 ○ ACTDIP004 ● ACTDIK008 ● ACTDIP009 ○ ACTDIP010 ● ACTDIP011 ○ ACTDIP012 ● ACTDIP013 ● ACTDIP017 ● ACTDIP019 ○ ACTDIP020 ○ ACTDIP027 ○

Page 3: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

ACTDIP028 ○ ACTDIP029 ○ ACTDIP030 ○ ACTDIP031 ○

Design & Technologies

ACTDEK001 ○

ACTDEK002 ○

ACTDEK004 ○

ACTDEP005 ○ ACTDEP006 ● ACTDEP009 ● ACTDEK010 ○ ACTDEP015 ○ ACTDEP018 ●

Page 4: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Lesson 1.6 – Introduction to Events Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.5 Device Compatibility: Laptop, PC or Tablet Lesson Overview Although students have been subconsciously using events whilst programming with Scratch, in this lesson it will be highlighted to them. They will understand that these blocks of code will only run when an event occurs (when a condition is met) and will begin to use events to program a remote control for Marty.

Learning Objectives • Understand that many starting blocks require a

condition to be met in Scratch before they will run

• Make use of events to control Marty’s actions • Create a remote-control program for Marty

Key Vocabulary • Code blocks

• Events

• Condition

Resources & Equipment • Marty the Robot

• Marty Workbook (Lesson 2)

• Laptops/Computers/Tablets • Access to the Scratch editor

Additional Reading • Educator’s Guide

• Introduction to Programming with Marty using Scratch

Learning Plan & Activities 1. Look at some examples of small programs that have been covered so far and discuss with the class when the code is

run and how the computer knows when to run it

2. Discussion of how certain events can trigger code and what events we can use in Scratch as a condition

3. Small programming task for students to explore the different events and trigger actions based on that event

4. Final task is to create a remote-control program using buttons as sprites that when clicked will control Marty to move

Additional Challenges

• Students could extend their remote-control program to have unique features such as a kick button or a dance button

Page 5: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Curriculum Benchmarks Curriculum for Excellence – Technologies Benchmark Guide

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.6 Digital Literacy TCH 0-01a ●

Craft, Design, Engineering and Graphics

TCH 1-09a ●

TCH 2-11a ○

TCH 3-12a ○

Computing Science

TCH 0-13a ●

TCH 1-13a ○ TCH 2-13a ● TCH 3-13a ○ TCH 4-13a ○ TCH 0-14a ●

TCH 0-14b ●

TCH 1-14a ● TCH 2-14a ● TCH 3-14a ○ TCH 0-15a ●

TCH 1-15a ● TCH 2-15a ●

National Curriculum – Computing, Design & Technology

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.6

Computing

1-a ●

1-b ●

1-c ●

1-e ●

2-a ●

2-b ○

2-c ○

3-a ○

3-f ○ 4-a ○ 4-b ○

Design & Technology

1.1-a ●

1.3-b ●

2.1-b ○

2.3-b ○ 3.1-d ● 3.3-c ○

Page 6: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Australian F-10 Curriculum – Digital Technologies, Design & Technologies ● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.6

Digital Technologies

ACTDIK001 ●

ACTDIK002 ●

ACTDIP003 ○

ACTDIP004 ●

ACTDIK008 ●

ACTDIP009 ○

ACTDIP010 ●

ACTDIP011 ○

ACTDIP012 ● ACTDIP013 ● ACTDIP017 ● ACTDIP018 ● ACTDIP019 ○ ACTDIP020 ○ ACTDIP027 ○ ACTDIP028 ○ ACTDIP029 ○ ACTDIP030 ○ ACTDIP031 ○ ACTDIP039 ○

Design & Technologies

ACTDEK001 ○

ACTDEK004 ○

ACTDEP005 ○

ACTDEP006 ● ACTDEP009 ● ACTDEK010 ○ ACTDEK013 ○ ACTDEP015 ○ ACTDEP016 ○ ACTDEP018 ●

Page 7: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Lesson 1.7 – Parallel Programming Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.6 Device Compatibility: Laptop, PC or Tablet Lesson Overview This lesson will be a basic introduction to parallel programming where students will think about how they can go about getting Marty to do two things at the same time rather than one after the other. First, this will be demonstrated in Scratch before trying it out with Marty.

Learning Objectives • Understand the difference between running two

commands at the same time versus one after the other

• Create a small program that makes use of parallel programming using Scratch

• Understand when parallel programming should be used

Key Vocabulary • Code blocks

• Parallel

• Sequence

• Programming

Resources & Equipment • Marty the Robot

• Marty Workbook (Lesson 3)

• Laptops/Computers/Tablets • Access to the Scratch editor

Additional Reading • Educator’s Guide

• Introduction to Programming with Marty using Scratch

Learning Plan & Activities 1. Discussion of how we can do two things at once sometimes, for example, lift both of our arms at the same time

2. As a class activity, using Scratch, program the Scratch cat to move 20 steps and say Hello

a. What do students notice about the order in which the cat does this? Does it move and speak at the same time? Or one after the other?

3. Discuss how students think that we would program Scratch cat to do this action at the same time by introducing the concept of parallel programming (doing multiple things at once)

4. Show the students how they could achieve getting the cat to move and talk at the same time

a. Get them to give it a shot on Scratch and see what other things they can program the cat to do at the same time

5. Now move on to thinking about Marty’s movements

a. Can we program Marty to do more than one move at a time? Any move or only certain ones?

b. Try and do these moves themselves (for example, do students think that they could lean to their left, put all their weight there and still kick their left foot?), highlighting limits of when we can use parallel programming

6. Ask students to try and experiment with parallel programming Marty, first of all by programming Marty to lift both arms up

Page 8: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Additional Challenges

• Get students to experiment with Scratch and see if they can program Scratch cat or Marty to do 3 things at once

Curriculum Benchmarks Curriculum for Excellence – Technologies Benchmark Guide

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.7

Digital Literacy TCH 0-01a ●

Craft, Design, Engineering and Graphics

TCH 0-11a ●

TCH 1-11a ●

TCH 1-12a ○

TCH 3-12a ○

Computing Science

TCH 0-13a ●

TCH 1-13a ○ TCH 2-13a ○ TCH 3-13a ● TCH 0-14a ● TCH 0-14b ● TCH 1-14a ● TCH 1-14b ● TCH 2-14a ○ TCH 3-14a ○ TCH 0-15a ● TCH 1-15a ● TCH 2-15a ○

National Curriculum – Computing, Design & Technology

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.7

Computing

1-a ●

1-b ●

1-c ●

1-e ●

2-a ●

2-b ●

2-c ●

3-a ●

3-b ● 3-d ○ 3-e ● 4-a ○ 4-b ○

Page 9: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Design & Technology 1.1-b ●

Australian F-10 Curriculum – Digital Technologies, Design & Technologies

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.7

Digital Technologies

ACTDIK001 ●

ACTDIK002 ●

ACTDIP003 ○

ACTDIP004 ●

ACTDIK008 ●

ACTDIP009 ○

ACTDIP010 ●

ACTDIP011 ○

ACTDIP012 ● ACTDIP013 ● ACTDIP017 ● ACTDIP019 ○ ACTDIP020 ○ ACTDIP027 ○ ACTDIP029 ○ ACTDIP030 ○ ACTDIP031 ○

Design & Technologies

ACTDEK001 ○

ACTDEK004 ○ ACTDEP005 ○ ACTDEP006 ● ACTDEP009 ● ACTDEP010 ○ ACTDEP015 ○ ACTDEP018 ●

Page 10: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Lesson 1.8 – Introduction to Variables Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.7 Device Compatibility: Laptop, PC or Tablet Lesson Overview Variables will be introduced in this lesson as a way of storing and remembering values that can be used later in a program for decisions to be made. This will start off with a small programming challenge in Scratch that will be extended to include Marty.

Learning Objectives • Understand that variables are a way to store and

remember a value for you • Understand when variables should be used • Create a program that makes use of a variable

to change the output

Key Vocabulary • Code blocks

• Variables

• Store

• Values

• Output

Resources & Equipment • Marty the Robot

• Marty Workbook (Lesson 4)

• Laptops/Computers/Tablets • Access to the Scratch editor

Additional Reading • Educator’s Guide

• Introduction to Programming with Marty using Scratch

Learning Plan & Activities 1. Discussion of when you are counting up something, how do you keep track of the total?

2. Introducing variables as a way to keep track of this for us in our programs

3. Show some example programs in the presentation and discuss what students think the printed message will be based on what the variable is holding

4. Programming task where students need to program a sprite in Scratch to say what the number is that is being held in the variable and add one to that value (a counting program)

5. Highlight that it isn’t just numbers that we can put into variables but also text too

a. Ask students to store their name in a variable by using the ask block as a way to get input from the user

b. Then include that variable in the Hello message to the user before asking them to click the sprite the number of times to represent the number of steps they want Marty to take

c. Students should then use the count variable to be the number of steps that Marty should take

Additional Challenges

• Students should explore what other Marty blocks they can use their variable values for (for example, taking in the angle of the mouse pointer to decide which way Marty should turn)

Page 11: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Curriculum Benchmarks Curriculum for Excellence – Technologies Benchmark Guide

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.8

Digital Literacy TCH 0-01a ●

Craft, Design, Engineering and Graphics

TCH 0-05a ●

TCH 3-12a ○

Computing Science

TCH 0-13a ●

TCH 1-13a ○ TCH 2-13a ○ TCH 3-13a ○ TCH 4-13a ○ TCH 0-14a ● TCH 0-14b ● TCH 1-14a ● TCH 1-14b ● TCH 2-14a ● TCH 2-14b ○ TCH 3-14a ○ TCH 0-15a ● TCH 1-15a ● TCH 2-15a ○ TCH 3-15a ○ TCH 4-15a ○

National Curriculum – Computing, Design & Technology

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.8

Computing

1-a ●

1-b ●

1-c ●

1-e ●

2-a ●

2-b ●

2-c ●

3-a ●

3-b ● 3-f ○ 4-a ○ 4-b ○

Design & Technology 1.1-a ●

3.1-b ○

Page 12: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Australian F-10 Curriculum – Digital Technologies, Design & Technologies ● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.8

Digital Technologies

ACTDIK001 ●

ACTDIK002 ●

ACTDIP003 ○

ACTDIP004 ●

ACTDIK008 ●

ACTDIP009 ○

ACTDIP010 ●

ACTDIP011 ○

ACTDIP012 ● ACTDIP013 ● ACTDIP017 ● ACTDIP018 ● ACTDIP019 ○ ACTDIP020 ○ ACTDIP027 ○ ACTDIP028 ○ ACTDIP029 ○ ACTDIP030 ○ ACTDIP031 ○ ACTDIP039 ○

Design & Technologies

ACTDEK001 ○

ACTDEK002 ○ ACTDEK004 ○ ACTDEP005 ○ ACTDEP006 ● ACTDEP009 ● ACTDEK010 ○ ACTDEK013 ○ ACTDEP015 ○ ACTDEP016 ○ ACTDEP018 ●

Page 13: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Lesson 1.9 – Introduction to If Statements Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge: Lessons 1.1-1.8 Device Compatibility: Laptop, PC or Tablet Lesson Overview In this lesson, students will continue to develop their understanding and programming skills by looking at a concept called if statements. Students will be asked to relate if statements to situations in real life before creating a small program where Marty responds to inputs such as random numbers or user input.

Learning Objectives • Consider the actions and tasks that we could use

robots like Marty to do • Understand how to read if statements and

predict outcomes • Use if statement coding blocks to program Marty

to respond to inputs

Key Vocabulary • If statements

• Coding Blocks

• Functionality

• Condition

• Decisions

Resources & Equipment • Marty the Robot

• Marty Workbook (Lesson 5)

• Laptops/Computers/Tablets • Access to the Scratch editor

Additional Reading • Educator’s Guide

• Introduction to Programming with Marty using Scratch

Learning Plan & Activities 1. Now that students have had a lot of time programming with Marty, they should now have an idea of what

functionalities Marty has. Discuss with the class what tasks or things that they think robots like Marty could do

2. Introduction to if statements and compare to real life situations like the following

IF there is a green man, THEN it is safe to cross the road

3. Ask students to think up some of their own examples of if statements

4. Split into groups so that there are 2-3 students per Marty and ensure that Marty is connected to a Scratch editor

5. Programming task of creating a Marty Magic 8 Ball where we will generate a random number and Marty will respond to this with an action or movement based on the number that is generated

Additional Challenges

• Using the ask blocks like in the previous lesson, students could ask users questions and use their inputs as a way to decide what actions Marty should respond with

Page 14: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Curriculum Benchmarks Curriculum for Excellence – Technologies Benchmark Guide

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.9

Digital Literacy TCH 0-01a ●

Technological Developments in Society & Business

TCH 0-05a ●

TCH 1-07a ● Craft, Design, Engineering and

Graphics TCH 0-11a ●

Computing Science

TCH 0-13a ●

TCH 1-13a ○ TCH 2-13a ○ TCH 3-13a ○ TCH 3-13b ○ TCH 4-13a ○ TCH 0-14a ● TCH 0-14b ● TCH 1-14a ● TCH 1-14b ● TCH 2-14a ○ TCH 3-14a ○ TCH 0-15a ● TCH 1-15a ● TCH 2-15a ●

National Curriculum – Computing, Design & Technology

● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.9

Computing

1-a ●

1-b ●

1c ●

2-a ●

2-b ●

2-c ●

3-a ●

3-b ○

3-f ○ 4-a ○ 4-b ○

Design & Technology 1.1-a ●

1.1-b ●

Page 15: Lesson 1.5 – Introduction to Loops - Marty the Robot...Lesson 1.5 – Introduction to Loops Education Level: Second Level (Age 7-11) Lesson Duration: 45 minutes Prerequisite Knowledge:

Australian F-10 Curriculum – Digital Technologies, Design & Technologies ● = Fully Addresses Benchmark ○ = Partially Addresses Benchmark

Curriculum Organiser Benchmark Covered Lesson 1.9

Digital Technologies

ACTDIK001 ●

ACTDIK002 ●

ACTDIP003 ○

ACTDIP004 ●

ACTDIK008 ●

ACTDIP009 ○

ACTDIP010 ●

ACTDIP011 ●

ACTDIP012 ● ACTDIP013 ● ACTDIP017 ● ACTDIP019 ● ACTDIP020 ● ACTDIP027 ○ ACTDIP028 ○ ACTDIP029 ○ ACTDIP030 ● ACTDIP031 ○ ACTDIP039 ○

Design & Technologies

ACTDEK001 ○

ACTDEP005 ○ ACTDEP006 ● ACTDEP009 ● ACTDEK010 ○ ACTDEP015 ○ ACTDEP018 ●