Msw Logo Worksheet 5
Msw Logo Worksheet 5
Overview
A unit of activities in which children are introduced to computer science through the use of Logo a text based
programming language. They will learn to how to control an on-screen turtle by giving it instructions. They will
programme the turtle by inputting a range of commands to achieve different outcomes. They will
be introduced to logo, a text based programming language
input primitives, abbreviated primitives and integers to move a turtle graphic across the screen
develop algorithms and group sequences of instructions together for efficiency
use repeat commands to achieve desired effects in a range of contexts
When teaching programming an easy mistake to make is to try and introduce too much too soon and not allow the children enough time
to consolidate their knowledge, skills and understanding. This unit deliberately provides a substantial number of opportunities for children
to practice simple programming with Logo without introducing more complex tasks or concepts.
National Curriculum
design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve
problems by decomposing them into smaller parts
Lessons
Lesson 1: Introducing Logo ................................................................................................................................................................ 2
Lesson 2: 2D shapes ......................................................................................................................................................................... 3
Lesson 3: Turtle drawing.................................................................................................................................................................... 4
Lesson 4: Using abbreviations ........................................................................................................................................................... 5
Lesson 5: Using repeat ...................................................................................................................................................................... 6
Lesson 6: Regular polygons............................................................................................................................................................... 7
Teaching activity
Logo primitives: forward; back; clearscreen
Introduce the children to the Logo program. Describe the areas of the screen: the main screen; the commander area; and the command
line. Introduce the primitive ‘forward’ and ask the children to suggest how far the turtle might need to travel to get to the top of the main
screen. Record the children’s initial suggestions progressively and demonstrate how to enter the command primitive (forward) followed
by a number (integer) in the command line and press <enter> on the keyboard. Keep a record of their programme as it develops and the
turtle moves to the top.
Ask the children if they can suggest how to make the turtle move back. Introduce the primitive ‘back’.
Introduce the primitive ‘clearscreen’, the children will need to use this if the turtle travels too far or they makes when programming the
turtle. The ‘clearscreen’ primitive will delete any trails that are visible on the screen and reposition the turtle in the centre of the screen.
Group/paired work
Using the primitives ‘forward’, back’ and ‘clearscreen’ the children estimate and command the turtle graphic to move to the top of the
main screen area, recording their work as it progresses. They can amend their work using ‘back’ and ‘clearscreen’ and test their result
when they have reached a conclusion.
Plenary
Discuss the activity with the children, what things can affect the success or otherwise of the instructions that they enter to make the turtle
move. What can they do to avoid and or correct mistakes that they make?
Teaching activity
Primitives: forward; back; right; left; clearscreen
Review with the children the main areas of the program window, and he command primitives that they have used to make the turtle move
forward and back and to start their work over. Ask the children if they can suggest the primitive that might be use to instruct the turtle to
turn right or left? Ask the children to describe how far the turtle would need to turn to face the left or right side of the main screen area
(left 90 or right 90) Record the children’s suggestions and programme the turtle. Use clearscreen to delete any trails that are visible on
the screen and reposition the turtle in the centre of the screen in order to start again.
Group/paired work
Using the primitives ‘forward’, ‘back’, ‘right’, ‘left’, and ‘clearscreen’ ask the children to programme the turtle to draw a square the children
should record heir programme as it progresses. Once complete ask the children to draw a rectangle and or a variety of different size
squares and rectangles. They should keep a record of their programme for each.
Plenary
Tell the children that each set of instructions that they developed to solve the problem is known as an algorithm. As before discuss the
activity with the children, what things can affect the success or otherwise of the instructions that they enter to make the turtle move. What
can they do to avoid and or correct mistakes that they make? Ask he children if they can tell you how to programme the turtle to draw
either a rectangle or square in one movement (type the entire set of instructions in the command line before pressing <enter> on the
keyboard).
Teaching activity
Primitives: forward; back; right; left; clearscreen; cleartext.
Review with the children their knowledge of how to programme the turtle graphic to draw on screen using. Introduce the primitive
‘cleartext’ and demonstrate how it can be used to clear all previous writing from the Commander window allowing them to start a new
project.
Introduce Programme record 3. Tell the children that you want them to develop algorithms to solve different drawing problems using the
turtle graphic. That they will need to develop a programme using a sequence of step by step instructions and that there is more than one
way to solve each problem
Group/paired work
Working with a partner the children complete one or more of the Programme record sheets (3 – 6) developing, testing and recording their
own solutions for drawing the different shapes
Plenary
Review some of the programming solutions, the algorithms that the children developed. Compare similarities and differences between
the solutions (their algorithms) developed to solve the same problem.
Teaching activity
Primitives: fd – forward; bk – back; rt – right; lt – left; cs – clearscreen; ct – cleartext; pu – penup; pd – pendown; (Programme record 8 –
ht – hideturtle; st – showturtle)
Review with the children their programming knowledge using Logo and how they are able to develop simple algorithms to draw shapes
on the screen using sequences of Logo primitives.
Introduce the primitives ‘penup’ and ‘pendown’ and demonstrate how these can be used to start and stop the turtle from drawing a line on
screen as it moves. Also introduce the children to ‘hideturtle’ and ‘showturtle’ and demonstrate how these can be used in their work.
Group/paired work
Working with a partner the children complete one or more of the Programme record sheets (7 – 8) developing, testing and recording their
own solutions for drawing the different shapes
Plenary
Review some of the programming solutions, the algorithms that the children developed. Compare similarities and differences between
the solutions (their algorithms) developed to solve the same problem.
Teaching activity
Review a programming solution for drawing a square (Programme record 2, solution 2b) and ask the children to identify which elements
of the programme are being repeated and how many times, (forward 100 right 90 is repeated four times). Ask them to explain why they
think this is (a square has four equal sides and four equal corners, this element of the programme instructs the turtle to draw one side
and turn one corner, if it repeats this element four times it will draw a square). Introduce the repeat command as a way to more efficiently
group commands together (repeat 4 [forward 100 right 90]) emphasise the need to use square brackets to define exactly which
commands needs to be repeated.
Group/paired work
In pairs the children use repeat to instruct the turtle graphic to draw a square and a rectangle and record their work.
Use Programme record 10 to extend the challenge and the activity.
Also the children can review any of the previous Programme record challenges (2-8) and see if they can improve their work by
incorporating repeats.
Plenary
Review some of the programming solutions, the algorithms that the children developed. Compare similarities and differences between
the solutions (their algorithms) developed to solve the same problem. Discuss with the children the benefit of using repeat within an
algorithm.
Teaching activity
Review a programming solution for drawing a square (Programme record 2, solution 2b), then review the algorithm using a repeat for
drawing a square (repeat 4 [fd 100 rt 90]) Discuss with the children why the algorithm specifically repeats four times (a square has four
equal sides and four equal corners). Ask the children if they can suggest what repeat might need to be used to instruct the turtle graphic
to draw a triangle encourage them to explain why. Ask the children if they can suggest an algorithm that uses repeat that will instruct the
turtle graphic to draw a triangle, test their suggestion.
If the suggested solution doesn’t work ask the children to review again the algorithm for a square and calculate how far in total the turtle
graphic turns (360°) Highlight to the children that the turtle turns a total of 360 but each turn is 90° ask them to suggest why this might be
the case (a square has four equal corners) Point out that 360° ÷ 4 = 90 can they suggest what sum they might use to calculate the angle
of turn for a triangle. (360° ÷ 3)
Group/paired work
In pairs the children calculate the required angles and develop algorithms to instruct the turtle graphic to draw a triangle and other regular
polygons
Plenary
Review he children’s work. Compare similarities and differences between the solutions (their algorithms) developed to solve the same
problem.
Programme record 1
Develop a series of instructions to draw using the turtle graphic.
Record your algorithm and draw your shape.
Programme record 2
Develop a series of instructions to draw using the turtle graphic.
Record your algorithm.
Programme record 3
Develop a series of instructions to draw using the turtle graphic. Record your algorithm.
Programme record 4
Develop a series of instructions to draw using the turtle graphic. Record your algorithm.
Programme record 5
Develop a series of instructions to draw using the turtle graphic. Record your algorithm
Programme record 6
Develop a series of instructions to draw using the turtle graphic
Programme record 7
Develop a series of instructions to draw using the turtle graphic
Programme record 8
Develop a series of instructions to draw using
Programme record 9
Develop algorithms that use repeat to instruct the turtle graphic to draw a square and rectangle
Programme record 10
Develop algorithms that use repeat to instruct the turtle graphic to draw these shapes.
Regular polygons
A square has 4 equal corners and 4 straight sides of
equal length.
360 ÷ 4 = 90
To draw any regular polygon the turtle must always turn a total of 360°. Can you
develop algorithms to instruct the turtle to draw other polygons with three, five, six,
eight, nine and ten side?
What other algorithms can you develop to draw shapes?
fill flood fills the region instructs the turtle to start painting, drawing a line
below the turtle
clean clears all drawing but leaves the turtle in its current position
ht
Programme record 10
Solution Solution