Learning How to Code

Page 1


Title: Learning How To Code

Ready-Ed

or eBo st r e p ok u S

ew i ev Pr

Teac he r

Publications

© 2019 Ready-Ed Publications Printed in Australia Author: Phillip Richards Illustrator: Alison Mutton

Acknowledgements i. This resource is to be used with the free computer language platform LOGO.

Copyright Notice

The purchasing educational institution and its staff have the right to make copies of the whole or part of this book, beyond their rights under the Australian Copyright Act 1968 (the Act), provided that: 1.

The number of copies does not exceed the number reasonably required by the educational institution to satisfy its teaching purposes;

2.

Copies are made only by reprographic means (photocopying), not by electronic/digital means, and not stored or transmitted;

3.

Copies are not sold or lent;

4.

Every copy made clearly shows the footnote, ‘Ready-Ed Publications’.

educational institution (or the body that administers it) has given a remuneration notice to Copyright Agency Limited (CAL) under Act. For details of the CAL licence for educational institutions contact: Copyright Agency Limited Level 19, 157 Liverpool Street Sydney NSW 2000 Telephone: (02) 9394 7600 Facsimile: (02) 9394 7601 E-mail: info@copyright.com.au

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

The Act allows a maximum of one chapter or 10% of the pages of this book, whichever is the greater, to be reproduced and/or communicated by any educational institution for its educational purposes provided that

. te

Except as otherwise permitted by this blackline master licence or under the Act (for example, any fair dealing for the purposes of study, research, criticism or review) no part of this book may be reproduced, stored in a retrieval system, communicated or transmitted in any form or by any means without prior written permission. All inquiries should be made to the publisher at the address below.

o c . che e r o r st super Published by: Ready-Ed Publications www.readyed.net info@readyed.com.au

ISBN: 978 192 561 130 4 2

m . u

w ww

Any copying of this book by an educational institution or its staff outside of this blackline master licence may fall within the educational statutory licence under the Act.

Reproduction and Communication by others


Contents Teachers' Notes Curriculum Focus

4-5 5-6

30 31 32 33

Polygons 2 Polygons 3 Variables Circles & Arcs 1 Circles & Arcs 2 Animations 1 Animations 2 Spirals Stars

34 35 36 37 38 39 40 41 42 43 45

11 12 13 14

Section Two: Basic Shapes Drawing & Doodling Sticks, Dashes & Stairs Squares & Rectangles 1 Squares & Rectangles 2 Squares & Rectangles 3 Flags 1 Flags 2 Triangles 1 Triangles 2 Triangles 3

15 16 17 18 19 20 21 22 23 24 25

Colour 1 Colour 2 Randomness

27 28 29

ew i ev Pr

or eBo st r 7 e p 8-9 ok u Section Four: Advanced Designs 10 S Polygons 1

Section One: Getting Started Downloading & Operating LOGO Introducing The Turtle 1 Introducing The Turtle 2 Introducing The Turtle 3 LOGO Reference Sheet 1 LOGO Reference Sheet 2

Teac he r

Tessellations 1 Tessellations 2 Tessellations 3 Transformations

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

Section Five: Moving The Turtle With Co-ordinates Using Co-ordinates 1 Using Co-ordinates 2 Coordinated Taxi Setting The Turtle's Heading

o c . che e r o r st su er Section Three: Colour & Tessellate 26p Answers

46 47 48 49 50 51-54

3


Teachers’ Notes What Is LOGO? LOGO is a free downloadable computer program that allows students to explore geometrical concepts by typing in commands that move a turtle around a screen. As the turtle moves, it draws lines. By using simple commands, students plan and create geometrical figures and designs.

Why Use LOGO? Using LOGO requires problem solving with logical deductions and creative and critical thinking. Students will learn about 2D shapes and angles while using this program. They will be motivated to use Geometry because of the challenging nature of the program and its ‘fun’ properties. Students will learn a computer language and will understand that it is important to ‘have a go’. Being wrong will lead them closer to the desired outcome and trial and error (experimenting and correcting) will lead to a planned and conceptualised result. As students correct ‘bugs’, they will move nearer to finding a solution.

Teac he r

• • • • •

ew i ev Pr

or eBo st r e p ok u S Who Is LOGO For?

Primary and secondary students – it caters for all year levels IT/STEM students Gifted and talented students Design and Technologies students Classroom teachers wanting an anchoring activity to help cater for fast finishers working with a compacted curriculum Classroom teachers searching for inexpensive ways to develop schemes of differentiation in the classroom

© ReadyEdPubl i cat i ons LOGO Pros f orr ev ewGeometry pur posesonl y• • LOGO is an• exceptional tool to i practise

• • • • • • • • •

w ww

LOGO has a low threshold but has a virtually unreachable ceiling LOGO fits the curriculum for Geometry and Measurement: 2D shapes – polygons, angles, tessellations, symmetry and transformations, co-ordinates LOGO has built-in student differentiation – students can progress as far and as fast as they like LOGO develops and strengthens planning skills Students are keen to attend LOGO sessions Print-outs of patterns and designs give tangible proof of outcomes Teachers are easily able to create challenges and problems LOGO involves learning how computer languages work There is extensive academic backing for LOGO’s use LOGO demands creativity coupled with being precise and accurate LOGO encourages students to invent and discover Teachers do not have to be ‘experts’ to introduce and follow this course – if you find your students are flying beyond you; that is all good!

. te

m . u

• •

o c . che e r o r st super

Options The worksheets in this book can be completed individually or in pairs. Students who finish the set work early should be encouraged to explore other shapes and patterns on their own. It can be useful to have students use an exercise book with a grid pattern. They may like to sketch out what they want to do and to plan a program. It may also be valuable to have them write down their commands.

4


Printing A Design

Printing directly from LOGO is not recommended. Usually there will be a lot of white space around the design; cropping will make the picture more practical to print. Follow these steps to print a design: 1. Save the design as a bmp, go to Menu Bar > Bitmap > Save As 2. Open up the bitmap in a photo editing software program, e.g. Paint or Photoshop, crop the design, then save. 3. Print directly from the picture editing program or import the bitmap into a word document or software of choice, then print.

Curriculum Links or e st

r e p u S

Bo ok

Teac he r

ew i ev Pr

LOGO sits neatly within the Australian Curriculum as it links to Mathematics and Digital Technologies. The Geometry and Measurement strands in the Mathematics learning area are particularly relevant as they involve shapes, angles, transformations and measurement.

Year 4 Mathematics Compare and describe two dimensional shapes that result from combining and splitting common shapes, with and without the use of digital technologies (ACMMG088) Compare the areas of regular and irregular shapes by informal means (ACMMG087) Construct suitable data displays, with and without the use of digital technologies, from given or collected data (ACMSP096) Generating ideas, possibilities and actions creating a two-dimensional shapes from verbal or written instructions. Create symmetrical patterns, pictures and shapes with and without digital technologies (ACMMG091) Compare angles and classify them as equal to, greater than, or less than, a right angle (ACMMG089) Science Science involves making predictions and describing patterns and relationships (ACSHE061) Compare results with predictions, suggesting possible reasons for findings (ACSIS216) Technology Sequence steps for making designed solutions and working collaboratively (ACTDEP009) Define simple problems, and describe and follow a sequence of steps and decisions (algorithms) needed to solve them (ACTDIP010) Implement simple digital solutions as visual programs with algorithms involving branching (decisions) and user input (ACTDIP011) Evaluate design ideas, processes and solutions based on criteria for success developed with guidance and including care for the environment (ACTDEP017) Plan a sequence of production steps when making designed solutions individually and collaboratively (ACTDEP018)

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super

“A natural choice for a programming language to use in geometry activities is LOGO”. Michael T. Battista (Professor of Mathematics Education)

5


or eBo st r e p ok u S

ew i ev Pr

Teac he r

Year 5 Connect three-dimensional objects with their nets and other two-dimensional representations (ACMMG111) Estimate, measure and compare angles using degrees. Construct angles using a protractor (ACMMG112) Use efficient mental and written strategies and apply appropriate digital technologies to solve problems (ACMNA291) Apply the enlargement transformation to familiar two dimensional shapes and explore the properties of the resulting image compared with the original (ACMMG115) Estimate, measure and compare angles using degrees (ACMMG112) Science Science involves testing predictions by gathering data and using evidence to develop explanations of events and phenomena (ACSHE081) Technology Develop project plans that include consideration of resources when making designed solutions individually and collaboratively (ACTDEP028) Design, modify and follow simple algorithms involving sequences of steps, branching, and iteration (repetition) (ACTDIP019) Year 6 Mathematics Select and apply efficient mental and written strategies and appropriate digital technologies to solve problems involving all four operations with whole numbers (ACMNA123) Construct simple prisms and pyramids (ACMMG140 ) Investigate combinations of translations, reflections and rotations, with and without the use of digital technologies (ACMMG142 ) Introduce the Cartesian coordinate system using all four quadrants (ACMMG143) Investigate, with and without digital technologies, angles on a straight line, angles at a point and vertically opposite angles. Use results to find unknown angles (ACMMG141) Describe probabilities using fractions, decimals and percentages (ACMSP144) Science Science involves testing predictions by gathering data and using evidence to develop explanations of events and phenomena (ACSHE098) Design & Technology Develop project plans that include consideration of resources when making designed solutions individually and collaboratively (ACTDEP028) Design, modify and follow simple algorithms involving sequences of steps, branching, and iteration (repetition) (ACTDIP019)

w ww

. te

6

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super


Section One:

Teac he r

ew i ev Pr

or eBo st r Getting e p ok u S Started

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super

7


• Teachers' notes •

Downloading & Operating LOGO 1. Download LOGO Firstly, get your students to download LOGO free onto a suitable device by going to either: http://sourceforge.net/projects/fmslogo or http://mswlogo.en.softonic.com/ Note: There may be slight differences between the two LOGO versions above. This resource is based on FMSLOGO.

2. Introduce The LOGO Workspace i.

or eBo st r e p ok u S

ew i ev Pr

Teac he r

After the students have downloaded and opened up LOGO, familiarise them with what they see on their devices. They will see one main screen called THE WINDOW (). This is where they will see all their creations (shapes, patterns, etc.). ii. The triangle in the middle of the main screen is THE TURTLE (). The position in which the turtle begins when they open up LOGO is called HOME. iii. THE COMMANDER INPUT () is where students type instructions or commands to move the turtle to create shapes and patterns. COMMANDER OUTPUT () is where the command history is displayed. This is where students should check for 'bugs' (errors), if something is not working. iv. If the children open up LOGO and the turtle is not there, they should type showturtle (st) into THE COMMANDER INPUT then click Execute () and the turtle will appear. It does not matter if students type lowercase or uppercase, LOGO is not case sensitive but spaces do matter! The menu  bar

© ReadyE dWINDOW Publ i cat i ons The •f orr evi ew pur posesonl y•

w ww

commander  output commander  INPUT

. te

m . u

The TURTLe

o c . che e r o r st super

Execute Edall

v. Students can choose to click Execute or alternatively press Enter on their keyboard /device to complete an action in Commander Input. vi. The bar running across the top of the screen is called THE MENU BAR (). Here they will find drop down menus for File, Bitmap, Set, Zoom and Help. Students will use some of these menus as they work through the activities in this resource.

3. Introducing The Turtle 1 - Page 10 Photocopy Page 10 for each student. Exercise 1: Students should familiarise themselves with the basic commands shown in the table. Optional: demonstrate and do them together as a class. Give the students time to practise using fd, bk, lt, rt and cs. Exercise 2: Challenge the students to draw a square. 8


• Teachers' Notes•

4. Introducing The Turtle 2 - Page 11 Photocopy Page 11 for each student. Exercises 1-2: Students create a square by entering the procedure fd 100 rt 90 fd 100 rt 90 fd 100 rt 90 fd 100. Tell students that fd 100 rt 90 is repeated four times. Introduce the repeat command, e.g. repeat 4 [fd 100 rt 90] This saves them from lots of typing. Primitives: In computer language, built-in commands (commands that the turtle already knows or has been taught) are called primitives. Students can store commands in the turtle's memory as they work their way through this resource which will save them time typing instructions. Saving work: Best practice is to save work after each LOGO session. Go to the Menu Bar > File > Save

or eBo st r e p ok u S

ew i ev Pr

Teac he r

Exercise 3: Students will teach the turtle how to square and store it into the turtle's memory. Every time they want to draw a square, they can simply type square into THE COMMANDER INPUT. If the students save their work after each LOGO session, the turtle will keep what it has learned in its memory. Remind students to save their work and give their work a suitable name. Troubleshooting & Bugs! In computer language an error is often referred to as a 'bug'. A ‘bug’ might include an extra space or a typo, or a missing input (number). Apart from looking for ‘bugs’, sometimes closing down the program and opening it up again is a good troubleshooter. If students are unable to achieve the shape or pattern in any of the activities, firstly ask them to go back and check what they have typed in by checking COMMANDER OUTPUT (). Usually errors happen because a student has incorrectly typed in a command. For example, they might have neglected to leave a space between letters or left too large a space or made a typo.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

m . u

The EDALL () button can also be useful to check new commands that have been defined. If you click on EDALL, a new window entitled EDITOR will appear. New commands are displayed in alphabetical order. Students may need to check for 'bugs' in here as well. To close the editor and return to the main screen, click the cross at the top right hand corner. If students make changes in EDITOR, they must Save and Exit from the menu bar on the EDITOR window or use the shortcut Control + D. Exercise 4: Students locate the EDALL button and check the new procedure stored from Exercise 3.

. te

5. Introducing The Turtle 3 - Page 12

o c . che e r o r st super

Photocopy Page 12 for each student.

c) lt 90

tle Tu r

Turtle

b) rt 180

Turtle

Exercises 1-3 will allow students to practise turning the turtle in the desired direction to create shapes and a zigzag.

d) lt 45

Possible procedure for a zigzag: rt 45 fd 50 rt 90 fd 50 lt 90 fd 50 rt 90 fd 50 lt 90 fd 50 Exercise 4 will give students more time to practise using fd, bk, lt, rt and cs and an opportunity to experiment and create new shapes. They could experiment printing shapes off here. 9


• section 1: getting started •

Introducing The Turtle 1

activity

The table below shows some basic commands and shortcuts for the computer program LOGO. n means a number has to go after the instruction. A number can represent steps or degrees! If you tell the turtle to fd 50, you are telling the turtle to move forwards 50 steps. If you tell the turtle to rt 90, you are telling the turtle to right turn 90 degrees.

1. Type each instruction into COMMANDER INPUT. Tick each one once you have

mastered each shortcut. You may need to use clearscreen (cs) before each attempt.

or e o st r Shows the turtle. B e p Hides the turtle. ok htu S Moves the turtle forward BUT you have

Instruction

Shortcut

showturtle

st

forward n back n

left n

Moves the turtle backwards BUT you have to tell it how far. E.g. bk 50

Turns the turtle to the right or clockwise. You need to tell it how far to turn in degrees. E.g. rt 90.

rt n ©R eadyEdPubl i cat i ons •f orr evi e wthepturtle ur p o s esonl y• Turns left or anti-clockwise. lt n

w ww

home

clearscreen clean

bk n

to tell it how far. E.g. fd 50

home

. tecs

You will need to tell it how far in degrees. E.g. lt 90.

The turtle goes straight home. Useful if it gets lost off screen. Wipes the world clean and puts the turtle back home.

o c . Rubs out all the lines but leaves the che e clean r turtle where it is. o r st super

2. Challenge! Can you work out how

to draw a square using some of the commands above? Write down the command you gave the turtle below.

10

m . u

right n

fd n

n means you have to type in a number. n is called a 'variable' because the number you type in varies.

Tick

ew i ev Pr

Teac he r

hideturtle

What it does


• section 1: getting started •

Introducing The Turtle 2

activity

1. When making a square, how do we know how many degrees to turn (rt/lt) the turtle? A square has 4 x 90 degree angles, so we turn (rt/lt) the turtle 90! Type in the following instruction, then click Execute:

fd 100 rt 90 fd 100 rt 90 fd 100 rt 90 fd 100 2. Look at the command to create a square (above), what do you notice? The instruction to draw each side of the square is repeated because all sides are equal. In LOGO, we can shorten the instruction by using the repeat command.

Teac he r

ew i ev Pr

or eBo st r e prt 90] then click Execute. ok Type in: repeat 4 [fd 100 u S

In computer language, built-in commands (commands that the turtle already knows or you have taught the turtle) are called primitives. The commands that you used in Introducing The Turtle 1 are built in primitives. You can teach the turtle new commands and store them in the turtle's memory to save time when typing in instructions. 3. Let’s create a primitive by teaching the turtle how to square and storing this command in its memory.

© ReadyEdPubl i cat i ons •f o4r r e vrti e wthen pu r p osesonl y• Type in: repeat [fd 100 90] press end. Type in: to square then press Enter. (A popup box will appear)

w ww

m . u

Now the turtle knows how to square! It should come up with a message square defined. To test its memory, type in square. Did it create a square? 4. Locate the Edall button and click it to open the Editor window. Can you see the new command that you have created? Save and Exit (Ctrl D) to return to the main window.

. te

5. Saving your work! Don't forget to save your work during or after each LOGO session, then the turtle will keep what it has learned in its memory. Go to the menu bar, click file and scroll down to save.

o c . che e r o r st super Troubleshooting And Bugs! Remember! If something doesn't work, remember to check COMMANDER OUTPUT and look at what you have typed in. You might even see error messages from LOGO. You can also open THE EDITOR (EDALL) to look for bugs.

Mistakes happen in the turtle world. Mistakes are GOOD and will help you learn. Each mistake brings you closer to what you want to happen. 11


• section 1: getting started •

Introducing The Turtle 3

activity

To draw lines and shapes, we can turn and move the turtle a certain number of degrees to the right or left.

45º

The circle in the diagram (right) has been divided up into 45 degree sections. The turtle is sitting in HOME position. To understand how to turn the turtle, complete the exercises on this page.

Turtle

or eBo st r e p ok u S

Teac he r r Tu

ew i ev Pr

1. Look at the first turtle (a). It has been turned right 45 degrees from HOME position. Draw the position of the turtle on circles b, c and d. Each time, the turtle starts at HOME. Check your answers by typing the commands into LOGO. Remember, clearing screen (cs) after each command, takes the turtle back HOME.

tle

©R eadyEdP ubl i cat i ons b) rt 180 c) lt 90 d) lt 45 •f or r e vi ew pu r pos eso l y • Try this! First Clearscreen then execute the four commands above, butn this time a) rt 45

do not Clearscreen (cs) in between. Your turtle should be pointing this way …

w ww

. te

a)

m . u

2. Write down your own command then try it in LOGO, draw the position of the turtle.

o c . che e r o r b) c) r d) st supe

3. Move the turtle to create a zigzag! Write down your procedure first. Hint: you will need to use fd, rt and lt commands. Store the zigzag in the turtle's memory to create a primitive.

4. Experiment! Use all the commands you have learnt so far to create an interesting shape. 12


LOGO Reference Sheet 1 Pages 13-14 are handy references for students and teachers for all activities in Learning How To Code.

Shortcuts introduced in Section 1- Getting Started You will need to use these for most activities.

st

ht

fd

bk

rt

lt

cs

Basic shapes defined in Sections 1 - 2. You will use these for many activities. Please note: procedures may vary depending on the variables used. Primitive

or eBo st r e p ok u S command/procedure

square

repeat 4 [fd 100 rt 90]

fd 100 rt 90 fd 200 rt 90 fd 100 rt 90 fd 200 home

flag

fd 100 square bk 100

manyspinflags

repeat 4 [flag rt 90]

triangle

repeat 3 [fd 83 rt 120]

ew i ev Pr

Teac he r

rectangle

©Shortcut ReadyEdPubl i cat i ons What it does E.g. repeat 4u [fdr 50p rt o 90].s This tellso then turtle •f o rr e i ew p es l yhow •many times repeat nv

Built in commands introduced in Sections 1-2. Primitive repeat

to repeat a command and saves you from lots of typing. This lifts the pen up and no mark is made.

penerase

pe

This goes over a line and erases it.

pendown

pd

This puts the pen down again.

setpensize [n n]

. te

m . u

pu

w ww

pen up

This makes the shape thicker or thinner. E.g. setpensize [ 2 2].

o c . chein Section 3: Colour & Tessellate. Built in commands introduced e r o r st super Primitive

Shortcut

What it does

setpencolour n

setpc n

Use numbers 0 -15 to set different pen colours.

setfloodcolour

setfc n

Use with fill to colour in an object.

random

random n

E.g. random 4 might output: 0, 1, 2, or 3.

fill

This colours in an object, use it with setfc.

13


LOGO Reference Sheet 2 Built in commands introduced in Section 4: Advanced Designs Primitive

Shortcut

What it does

arc n n

arc 180 50 draws an arc (semi circle in this case) 50 steps from the turtle’s position. 180 is the number of degrees it turns to create the arc. The turtle already knows how to arc.

arc2 n n

The turtle travels on the arc. Try arc2 90 100.

circle n

This makes a circle with the turtle in the middle. The number is the radius (distance to the edge from the turtle). circle 50, for example, will create a smaller circle than circle 100. The turtle already knows how to circle.

wait n

wait n

This draws the circle starting with the turtle.

ew i ev Pr

fence

Teac he r

circle2 n

or eBo st r e p ok u S

This fences the turtle in – it stops the turtle from moving off the screen.

E.g. wait 60 = about 1 second. This can be used to create animations.

Built in commands introduced in Section 5: Moving the turtle with coordinates Primitive setheading n

© ReadyEdPub l i cat i ons Shortcut What it does E.g. seth 0 points north straight up;o seth 90 points • f orr ev i e w pu r poro ses n l y •east and seth n so on.

setxy nn

This sets both the x and the y positions at once, combines setx and sety; setpos [x y] does the same.

setpos [x y] sety n

14

setpos [100 50]

. te

Does the same as setxy.

m . u

This moves the turtle to a spot left or right. E.g. setx 50.

w ww

setx n

o c . che e r o r st super

This moves the turtle to a spot up or down, E.g. sety 60.


Section Two:

Teac he r

ew i ev Pr

or eBo st r Basic e p ok u Shapes S

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super

15


• section 2: basic shapes •

activity 1

Drawing & Doodling

1. What shape does the turtle draw when you type in the instruction below? fd 100 bk 200 fd 100 rt 90 fd 100 bk 200 home Draw the shape the turtle has drawn. Show your drawing to a friend. Did he/she get the same shape? Draw the shape your friend has drawn. My friend's shape

or eBo st r e p ok u S

troubleshooting & bugs! If you and your friend have different shapes, check your work. What procedure have you typed in? Check the COMMANDER OUTPUT. Have you made a typo?

ew i ev Pr

Teac he r

My shape

© ReadyEdPubl i cat i ons 2. Type instructions into LOGO to create the arrow below! Hint: You will need to go forwards f o r e i e pur po eson ythe•turtle how (fd), turn the• turtle (rtr and lt)v and gow backwards (bk) too!s Remember tol tell

w ww

. te

m . u

many steps to go forwards and backwards and how many degrees to turn left and right. Write the instructions you used below. Use the extra space for working out.

__________________________________________ __________________________________________

o c . che e r o t r s s r u e p 3. Now try this! Write the instructions you used in the space below. Is it the same as your __________________________________________

friend's instruction?

__________________________________________ __________________________________________ __________________________________________

16


• section 2: basic shapes •

Sticks, Dashes & Stairs

activity 2

Remember to clearscreen (cs) before you begin.

Sticks, dashes and stairs are line patterns that you can make by instructing the turtle to lift off the page, so that it does not leave a mark. You can make the lines thicker or thinner by adjusting the pen size.

Instruction pendown

pu

This lifts the turtle up so it does not leave a mark.

pd

This puts the turtle down again.

ew i ev Pr

Teac he r

penup

r o e t s B r e oo Shortcut What it does p k Su

This makes the pen thicker or thinner. Try setpensize 5 or click on set from THE MENU BAR and select pensize to adjust.

setpensize n n = number

TT Can you create these four patterns on screen? Follow the instructions for Shapes A, B and C. Don’t forget to clearscreen (cs) after each one. Write the instructions in the space provided that you used to create shape D.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

setpensize [5 5]

setpensize [2 2]

fd 40 pu fd 20 pd

fd 80 pu rt 90 fd 40 lt 90 pd

fd 40 pu fd 20 pd

fd 80 pu rt 90 fd 40 lt 90 pd

fd 40 pu fd 20 pd

fd 80 pu rt 90 fd 40 lt 90 pd

. te

Shape C : (sticks)

m . u

Shape B (stairs)

w ww

Shape A (dashes)

o c . che e r o r st super Shape D (bold stairs)

setpensize [1 1] pd fd 80 bk 80 pu rt 90 fd 40 lt 90 pd fd 80 bk 80 pu rt 90 fd 40 lt 90 pd fd 80 bk 80 pu rt 90 fd 40 lt 90

17


• section 2: basic shapes •

Squares & Rectangles 1

activity 3

Can your turtle make a foursquare? A foursquare is four squares that make a square. To foursquare the turtle must have been taught how to square. See page 11 to create a primitive for a square. 1. Use the repeat command to teach the turtle to foursquare.

or eBo st r e p ok Type in: repeat 4 [square rt 90] then press end. u S

ew i ev Pr

Teac he r

Type in: to foursquare then press Enter.

Check your work! The procedure foursquare should now be programmed into LOGO! Check 1 commander output: you should see the message foursquare defined. Check 2 commander input: type in foursquare. Did it create a foursquare like the one above? If not look for 'bugs'. 2. How can you drive the turtle around its world to draw a rectangle?

© ReadyEdPubl i cat i ons Try: fd 100 rt 90 fd 200 rt 90 fd 100 rt 90 fd 200 •f orr ehome vi ew ur p osesonl y• thenp press Enter.

. te

m . u

w ww

3. Store the instructions for a rectangle into the turtle's memory. Write down the procedure below.

o c . che edown the procedures r o 4. Experiment making different sizedr squares and rectangles. Write st super that you have used.

18


• section 2: basic shapes •

activity 4

Squares & Rectangles 2

1. Can you move the turtle to make the shape below? The shape is made up of three squares and one rectangle. Write the instructions that you gave the turtle to create this shape in the space provided. Use the extra space for working out.

__________________________________________ __________________________________________

or eBo st r e p ok u S Your teacher has the answers

ew i ev Pr

Teac he r

__________________________________________

2. How many different shapes can you make that are made up of squares and rectangles? Can you create these two? Write down the procedures that you have used. Share with a friend.

© Rea__________________________________________ dyEdPubl i cat i ons •f orr evi ew pur posesonl y• __________________________________________

w ww

. te

m . u

__________________________________________ __________________________________________

o c . ch e __________________________________________ r er o t s s r u e p __________________________________________ __________________________________________ __________________________________________ Store these shapes as primitives. Give them names.

19


• section 2: basic shapes •

Squares & Rectangles 3

activity 5

Before attempting any of these shapes the turtle should have been taught to square and rectangle

or eBo t s r e __________________________________________ p ok u S __________________________________________

ew i ev Pr

Teac he r

1. Can you move the turtle to make the dog shape below? The dog is made up of three squares and one rectangle. Write the instructions that you gave the turtle to create this shape in the space provided. Use the extra space for working out.

__________________________________________ __________________________________________

2. How many different shapes can you make that are made up of squares and rectangles? Can you create the stacked blocks and the letter H? Write down the procedures that you have used. Share with a friend.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

. te

m . u

__________________________________________ __________________________________________ __________________________________________

o c . che e r o r st super

__________________________________________

__________________________________________ __________________________________________ __________________________________________ __________________________________________

20


• section 2: basic shapes •

activity 6

Flags 1

1. Teach the turtle to make a flag. Your turtle should already know how to draw a square. It will need to know how to square to draw the flag.

So try: to flag, then press Enter. Type in fd 100 square bk 100, then click end. Remember to type in: flag to test the turtle's memory.

or eBo st r e p ok u S Type in to threeflags, then press Enter.

ew i ev Pr

Teac he r

2. How do you create more than one flag? Type in the instructions below.

Type in: repeat 3 [flag rt 90 pu fd 150 lt 90 pd]

then press end. Now type in: threeflags and they should appear!

© ReadyEdPubl i cat i ons pu means pen up and pd means pen down. •f orr evi ew pur posesonl y• Remember!

w ww

. te

m . u

3. Can you create a spinning flag using the repeat instruction? Type in the instructions below.

Firstly draw one flag, by typing in: flag. To teach it to spin this flag, type in: to spinflag and press Enter. Type in: repeat 4 [flag rt 90] and press end. Then type in: spinflag.

o c . che e r o r st super

If something doesn't work, remember to check commander output and the EDITOR (EDALL) to look for bugs.

21


• section 2: basic shapes •

activity 7

Flags 2

1. Instead of just a four arm flag, how about making a many armed flag? You will need to ask the turtle to create more than 4 flags. What procedure will you use to create the shape below? Write the procedure. Use the extra space for working out.

__________________________________________ __________________________________________

or eBo st r e p ok u __________________________________________ S

2. Create the shape below by teaching the turtle to manyspinflags.

ew i ev Pr

Teac he r

__________________________________________

Type manyspinflags and press © Ready Ein:dtoP ubl i cat i on sEnter. Type in: repeat 72 [spinflag rt 5] then press •f orr evi e wNow pu r pin:omanyspinflags. sesonl y• end. type

w ww

. te

m . u

Very cool isn’t it!

o c . che e r o r st s Asu well ase csr (clearscreen), p you might like to use clean to wipe your screen clear. This leaves the turtle where he was last. Try it.

22


• section 2: basic shapes •

activity activity8

Triangles 1

Your challenge is to draw an equilateral triangle (all sides are the same) using LOGO. Experiment using the steps below, then find out a correct procedure on the next page.

Remember all shapes make a full-turn of 360 degrees.

Hint! When you drew a square, you turned the turtle 90 degrees, e.g. repeat 4 [fd 100 rt 90] So, what angle do you think you should instruct the turtle to turn for a triangle?

ew i ev Pr

Teac he r

Step 1

or eBo st r e p ok u S Try typing in this: repeat 3 [fd 83 rt 60]. The

angle you are asking the turtle to turn here is 60 degrees. Did the turtle draw a triangle? Draw the shape left. Experiment with different angles until the turtle draws the perfect triangle.

© ReadyEdPubl i cat i ons •f rr e vi ewis p ur p obyse onl •a shape Hint! One way ofo working out angles to divide 360 thes number ofy sides Step 2

m . u

has.

w ww

Have you got it yet? If yes, write the procedure you used here and draw the triangle you have created.

. te

o c . che e r o r st super

Extension! Now that you know about angles, maybe you can draw a hexagon? Remember that the angle comes after rt or lt. You can make shapes bigger or smaller by adjusting the number after fd. The number of repeats made alters, depending on the shape.

23


• section 2: basic shapes •

activity activity9

Triangles 2

1. A procedure for drawing an equilateral triangle is:

repeat 3 [fd 83 rt 120] Try it now. Did it work?

or eBo st r e p o[fd 83 rt 120], Type in: to triangle, then press Enter. Type in: repeat 3k u then press end.S Type in: triangle.

ew i ev Pr

Teac he r

2. Now teach LOGO to triangle.

Did it work?

3. Now LOGO knows how to draw a triangle and a square, move it to draw a house and a rocket using triangles and squares! Write your procedure below. Use the extra space for working out.

© Rea dyEdPubl i cat i ons __________________________________________ •f orr e vi ew pur posesonl y• __________________________________________

w ww

. te

m . u

__________________________________________

__________________________________________

o c . che e r o __________________________________________ r st super __________________________________________

Careful! The turtle may have to be positioned to begin with! 4. What else can you draw using squares, rectangles, and triangles? Write the procedures and draw the shapes on spare grid paper or on the back of this sheet.

24


• section 2: basic shapes •

activity activity10

Triangles 3

1. Can you create the pattern below using triangles?

Try: to manytriangles, then press Enter. Type in: repeat 15 [triangle rt 360/15] then press end. To test, type in: manytriangles.

Yout should have made the pattern left! r o e s Bo r e p ok u S

a. repeat 6 [triangle rt 360/6]

b. repeat 10 [triangle rt 360/10]

ew i ev Pr

Teac he r

2. Now try these! Draw what you have created.

w ww

c. repeat 16 [triangle rt 360/16]

. te

d.

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y• fd 200 rt 56 fd 89 home

o c . che e r o r st super

3. What is different about triangle d? ___________________________________________ 4. Create your own patterns in LOGO using triangles. Work with a friend. Have fun!

25


Section Three:

Teac he r

ew i ev Pr

or eBo st r Colour & e p ok u Tessellate S

w ww

. te

26

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super


• section 3: colour and tessellate •

activity 11

Colour 1

The pen colour can be set by using THE MENU BAR. You can adjust the shades of each colour by dragging the bars up and down. 1. Can you create a yellow triangle? Follow the instructions below.

Go to set on THE MENU BAR and select pen colour. Click on yellow and press ok. Now ask LOGO to triangle. Did you get a yellow triangle? _____________________

or eBo st r e p ok u S

Teac he r

0 1 2 3

black blue green cyan

4 5 6 7

red magenta yellow white

8 brown 9 tan 10 forest 11 aqua

12 13 14 15

salmon purple orange grey

ew i ev Pr

Alternatively, you can type in instructions to create colour. LOGO has 16 preset colours (1-15).

2. You will see from the list above that 4 represents red. Follow the instructions below to create a red triangle.

Type in: setpencolour 4 or setpc 4 Now ask LOGO to triangle. Did you get a red triangle? _______________________

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

. te

m . u

3. Each preset colour has a value between 0 and 255. To manually adjust the shades of the colours type in a value. Follow the instructions below.

setpencolour [120 5 230] Type in: triangle. Did you get a purple triangle? ___________________ setpencolour [120 200 230] Type in: triangle. Did you get a light blue triangle? _________________

o c . che e r o 4. Pen size or thickness can be set r using two numbers. st su per

setpensize [1 1] Type in: triangle. How thick/thin is the line? _______________________ setpensize [5 5 ] Type in: triangle. How thick/thin is the line? _______________________

5. Can you create some other coloured designs? Work with a friend.

27


• section 3: colour and tessellate •

activity 12

Colour 2

How can you colour in shapes with LOGO? Create a shape then set your chosen colour using floodcolour to colour it in. Remember the 16 preset colours (0-15):

Teac he r

black blue green cyan red magenta yellow white

8 brown 9 tan 10 forest 11 aqua 12 salmon 13 purple 14 orange 15 grey

or eBo st r e p ok u S

1. Create a triangle with a black outline and a red fill.

Type in: setpencolour 0 or setpc 0. Type in triangle. Type in: setfloodcolour 4 for red. Type in: rt 30 pu fd 20 fill bk 20 pd lt 30 Hint: Here you are driving the turtle into the shape, filling it and driving the turtle back out again.

ew i ev Pr

0 1 2 3 4 5 6 7

Don’t forget the pendown control if you want to start drawing again.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

Type in: setpencolour 0 or setpc 0 Type in: flag

m . u

2. Create a flag with a black outline and a blue fill.

. t o Hint: You need toe go to the start of the square part of the flagc . che e r o r st super Type in: cs flag fd 100 rt 45 pu fd 10 fill bk 10 lt 45 pd bk 100

3. Type in the instructions below.

Type in: setfloodcolour 2 repeat 2 [fd 200 rt 90 fd 37 rt 90] rt 30 pu fd 10 fill bk 10 lt 30 pd What coloured shape did you get? _____________________________ 4. Experiment! Remember to teach LOGO to learn some coloured shapes that you have drawn, e.g to bluesquare 28


• section 3: colour and tessellate •

activity 13

Randomness

Random means anything could happen! We can ask the turtle to colour the shapes we create randomly. If we type in: setpencolour random 16, the turtle will select, at random, a pencolour from the16 colours ( 0 -15). We do not know what the turtle will select. The turtle will select a different colour each time.

Random!!

or eBo st r e p ok u S

ew i ev Pr

Teac he r

Remember! For the exercise below to work, you must have taught LOGO how to square (Page 11), flag (Activity 6) and triangle (Activity 8).

1. Create a square, flag and triangle using setpencolour random. Write down the colours that LOGO creates underneath the shapes.

Type in: setpencolour random 16 Type in: square. Type in: setpencolour random 16 Type in: flag Type in: setpencolour random 16 Type in: triangle.

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

Remember! The colours you produce will not be the same as the colours that your friend produces. This is because you are telling LOGO to select the colours at random.

. te o c 2. Now try these shapes. Write down the colours that LOGO creates underneath the . che e shapes. r o r st super Type in: setpencolour random 16 Type in: manyspinflags. Type in: setpencolour random 16 Type in: rectangle

29


• section 3: colour and tessellate •

activity 14

Tessellations 1

A tessellation is an arrangement of shapes closely fitted together, especially of polygons in a repeated pattern without gaps or overlapping. Let’s have some fun with LOGO and tessellations. 1. Make some stairs and store this in the turtle’s memory by following the instructions:

or eBo st r e p ok u S

2. Create a simple tessellation by following the instructions:

ew i ev Pr

Teac he r

Type in: to stair, then press Enter. Type in: repeat 4 [fd 50 lt 90 fd 50 rt 90] lt 180 fd 200 lt 90 fd 200 then press end. Type in: stair. Do your stairs look like the example left?

Type in: to boxstair, then press Enter. Type in: stair Type in: pu lt 90 fd 200 lt 90 fd 150 lt 90 pd Type in: stair Type in: end Type in: boxstair

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

Hint: Try making 4 sets of 'stair' using repeat 4. Write your program and store it in EDITOR.

. te

m . u

3. Can you make this stair pattern?

o c . che e r o r st super

4. Time to experiment! Create your own tessellation with stair. Print out your design and share it with the class. 30


• section 3: colour and tessellate •

activity activity15

Tessellations 2

Now you know how to triangle, to colour and tessellate, how about you put them all together to create the tessellated shapes below. Experiment and write down your procedures. Use the extra space for working out. If you cannot produce the shapes, don’t worry, hop to Activity 16 to find out how!

ew i ev Pr

Teac he r

Tessellation 1

or eBo st r e p ok u S

__________________________________________ __________________________________________ __________________________________________

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

Tessellation 2

. te

m . u

__________________________________________

o c . che e r o r st super

__________________________________________ __________________________________________ __________________________________________ __________________________________________

31


• section 3: colour and tessellate •

activity activity16

Tessellations 3

1. Follow the step-by-step instructions to create tessellations with coloured triangles.

Type in: to colouredtri, then press Enter. Type in: rt 30 repeat 3 [fd 50 rt 120] setfloodcolour 6 rt 30 pu fd 30 fill bk 30 pd lt 60 then click end. Type in: colouredtri then press Enter.

Draw!

or eBo st r e p okDraw! Type in: to tesstri andu press Enter. Srt 90 repeat 5 Type in: lt 90 fd 250 [colouredtri rt 90 fd 50 lt 90] and press end. Type in: tesstri then press Enter.

3. Create one row of a tessellation like below.

ew i ev Pr

Teac he r

2. Create a row of coloured triangles.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

. te

4. Create six rows of tessellation like below.

m . u

Type in: to tesstri2 and press Enter. Then type in: tesstri lt 30 fd 50 lt 60 fd 200 bk 200 rt 60 bk 50 rt 30, and press end. Type in: tesstri2. Did it create the pattern below? If not, look for 'bugs'.

o c . che e r o r st super

Type in: to tesstri3, press Enter. Type in: repeat 6 [tesstri2 lt 30 fd 50 rt 30], press end. To test the turtle’s memory, type in: tesstri3.

Top Tip! Sometimes to create more complex designs, you have to build on top of one procedure (as above). This is called nesting and makes debugging easier.

32


• section 3: colour and tessellate •

activity 17

Transformations

A shape can be flipped, rotated or slid using LOGO. This is known as a transformation. Make a shape and then: • flip it • slide it • rotate it.

or eBo st r e p ok u Shape A S (Original) Shape B

ew i ev Pr

Teac he r

TT Draw Shape A with the turtle. Save it as a primitive (e.g. to shapea). Now try to transform it to create Shape B and Shape C.

w ww

Command to create Shape A:

. te

Shape C

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

Command to create Shape B:

o c . che e r o r st super

Command to create Shape C:

33


Section Four:

Teac he r

ew i ev Pr

or eBo st r Advanced e p ok u S Designs

w ww

. te

34

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super


• section 4: advanced designs •

activity 18

Polygons 1

A regular polygon is a polygon that is equiangular (all angles are equal in measure) and equilateral (all sides have the same length). Study the regular polygons below. 90°

90°

square

hexagon

4 sides

90°

or eBo st r e p ok u S 6 sides

octagon 8 sides

ew i ev Pr

Teac he r

90°

nonagon 9 sides

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

To create a square, the turtle turns 90 degrees four times or 90 x 4 = 360. This formula shows us that the angle that the turtle needs to turn is the number of sides of the polygon divided into 360 degrees. The turtle always makes a trip of 360 from the start to back. Use the formula 360/the number of sides to make your polygon.

2. Create two octagons in LOGO. Follow the procedure below.

. te

m . u

w ww

1. Applying the information above, calculate the angles that the turtle would have to turn to create a hexagon, octagon and nonagon. Write the angles inside each shape above.

o c . che e r o t r s s r u e p _________________________________________ Type in: repeat 8 [fd 87 rt 45] then press Enter. Type in: repeat 8 [fd 40 rt 360/8] then press Enter. Which octagon is larger? Why?

_________________________________________ _________________________________________ _________________________________________

35


• section 4: advanced designs •

activity 19

Polygons 2

A regular polygon is a polygon that is equiangular (all angles are equal in measure) and equilateral (all sides have the same length). Study the regular polygons below. 1. Create another polygon and write the procedure in the space below.

Draw!

The polygon I have created has ___ sides.

or eBo st r e p ok __________________________________________ u S This is the procedure to create the shape:

ew i ev Pr

Teac he r

__________________________________________

2. A heptagon has 7 sides. Write two LOGO procedures to create a heptagon. Remember to test them.

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

w ww

______________________________________

m . u

3. Create a polygon of your choice. Draw it and write the procedure below.

. te o ______________________________________ c . che e r ______________________________________ o r st super ______________________________________

______________________________________

Top Tip! As the number of sides increase, the size of the sides might have to decrease. E.g. For an octagon, the turtle goes forward 80 (fd 80), for a nonagon, the turtle goes forward 40 (fd 40).

36


• section 4: advanced designs •

activity activity20

Polygons 3

You can use polygon procedures to make patterns. The patterned shapes below are made with hexagons. Remember hexagons are six-sided shapes. 1. Teach LOGO how to hexagon. Follow the instructions below.

Type in to hexagon, then press Enter. Now type in: repeat 6 [fd 50 rt 60], then click end. Now type in: hexagon, then press Enter.

or eBo st r e p ok u S

2. Match the patterns to the instructions. Can you do this without using LOGO? How?

Teac he r

B

C

ew i ev Pr

A

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y• Type in: to hexapattern, then type in: repeat 10 [hexagon rt

m . u

360/10] and press end. Now type in: hexapattern, then press Enter.

w ww

Type in: to hexapattern2, then type in: repeat 12 [hexagon rt 360/12] and press end. Now type in: hexapattern2, then press Enter. Type in: to hexapattern3, then type in: repeat 18 [hexagon rt 360/18] and press end. Now type in: hexapattern3, then press Enter.

. te

o c . che e r o r st super

3. Look at the instructions above again. Does LOGO need to know how to hexapattern2 to be able to hexapattern 3?

________________________________________________________________________

4. Experiment! Create more patterns like the ones right with different polygons. Print out your most interesting ones. Use the back of this sheet to keep a record of the procedures.

37


• section 4: advanced designs •

Variables

activity activity21

If we want to write an instruction for someone to follow but want them to be able to vary the shape, we can use letters to represent numbers: When the person following the instruction sees any of the variables above in an instruction, they know that they can enter their own information.

variable :s :n :t :l

stands for size number number of turns length of sides

or eBo st r e p ok u S

Teac he r

Instruction: setpensize [5 5] fd 80 pu rt 90 fd 40 lt 90 pd fd 80 pu rt 90 fd 40 lt 90 pd fd 80 pu rt 90 fd 40 lt 90 pd

ew i ev Pr

1. Rewrite this procedure to create the bold stairs (see picture), but allow the person following the instruction to set their own pen size. What are you going to replace [5 5 ] with, to make this a variable?

___________________________ ___________________________ ___________________________

© ReadyEdP ubl i cat i ons ___________________________ •f orr evi ew pur posesonl y•

w ww

_____________________________________

Instruction: repeat 4 [fd 100 rt 90]

. te

m . u

2. Now rewrite the instruction for a square so that the person following it, can alter the length of each side.

_____________________________________

o c . che e r o _____________________________________ r st super _____________________________________

3. Can you incorporate a variable in this rectangle procedure?

Instruction:

fd 100 rt 90 fd 200 rt 90 fd 100 rt 90 fd 200 home

38

______________________________________ ______________________________________


• section 4: advanced designs •

activity 22

Circles & Arcs 1

1. Circle! Use any polygon procedure to draw a circle. You need 1 side and to turn 1 degree. Follow the example below.

Type in: repeat 360 [fd 1 rt 1] then press Enter. What does fd stand for?__________________________ What does rt stand for?__________________________

or eBo st r e pType in: repeat 360 [fd 1 rt 1]othen press Enter. u k S Type in: repeat 360 [fd 1 lt 1] then press Enter.

ew i ev Pr

Teac he r

2. Two circles! To make the circle go the other way and draw two circles next to one another, change the right turn (rt) to a left turn (lt).

3. Arc! To make a semi-circle or an arc, you need to adjust how many turns it makes – e.g. reduce it by half to draw half the circle. Follow the example below.

in: repeat 180 [fd 1 rt 1] then press Enter. © ReaType dyEdPubl i cat i ons What does 180 stand for?__________________ •f orr evi ew pur posesonl y•

w ww

m . u

4. Spiral! Gradually change the step size. Follow the example below.

Type in: repeat 180 [fd 1.5 rt 1] repeat 180 [fd 2 rt 1]

repeat 180 [fd 2.5 rt 1] repeat 180 [fd 3 rt 1] then press Enter.

. te

o c . c e hebelow, r 5. More circles! To get the effect gradually increase the o r st step size (fd) of a circle. super Type in: repeat 360 [fd 1.5 rt 1] Type in: repeat 360 [fd 1.5 lt 1] Type in: repeat 360 [fd 2 rt 1] Type in: repeat 360 [fd 2 lt 1] Type in: repeat 360 [fd 2.5 lt 1] Type in: repeat 360 [fd 2.5 rt 1] Then press Enter.

6. Experiment! Create more patterns with circles, arcs and spirals. Print out your most interesting ones. Use the back of this sheet to keep a record of the procedures. 39


• section 4: advanced designs •

Circles & Arcs 2

activity 23

Actually the turtle already knows how to do arcs and circles. Some are drawn with the turtle in the centre and others with the turtle on the circumference. 1. Open LOGO and try these: What it does

Type in: circle 100 then press Enter.

Draw a circle with a radius of 100 with the turtle in the centre.

Type in: circle2 150 then press Enter.

Draw a circle with a radius of 150 with the turtle on the circumference.

Type in: arc 90 100 then press Enter.

Draw an arc of 90° with a radius of 100 and the turtle in the centre.

Type in: arc2 60 200 then press Enter.

Draw an arc through 60° with a radius of 200.

or eBo st r e p ok u S

ew i ev Pr

Teac he r

Instruction

2. Pair up! Look at this beach scene. The birds, waves and fish are built up with arcs. Can you recreate it using LOGO? Jot down your procedure in the space provided and on the back of the sheet. Hint: Build it up bit by bit. Write three procedures; one for the birds; one for the waves and one for the fish. Test each one before putting them all together.

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

3. This flower is made up of circles and arcs. Can you create this by moving the turtle? Write the instructions below. Use the back of the sheet if you need more room.

40

o c . che e r o r st super


• section 4: advanced designs •

activity 24

Animations 1

You can create animations with LOGO, by making the shapes that you have created move! This is done using the wait and clean commands. The wait command can stop the turtle and make it wait before going on again. You might use wait 60 or wait 10 – whatever works for you. Wait 60 means the turtle will wait 1 second before moving again. Wait 600 means the turtle will wait 10 seconds before moving again. Wait 1 is 1/60th of a second.

or eBo st r e p ok u S

After typing in wait plus a number, you then need to use the command clean, followed by either rt (right turn) or lt (left turn). This will tell the turtle which way you want the shape to move. Then you need to type in an angle, e.g. rt 45.

Teac he r

ew i ev Pr

Remember! For the exercise below to work, you must have taught LOGO how to square (page 11) , flag (Activity 6) and spinflag (Activity 6).

TT Can you make four/eight flags spin like a windmill by using the wait command? Write a procedure to make it work well. Pair up to make it easier. Use the space for working out.

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st Your teacher has super the answers

41


• section 4: advanced designs •

Animations 2

activity 25

1. Can you make the little man jump? This is done differently to the windmill on the previous page. First! Draw the jumping men separately and name them jumpman1, jumpman2, jumpman3. Teach LOGO to remember each jumpman.

or eBo st r e p ok u S

Procedure:

ew i ev Pr

Teac he r

Procedure:

w ww

Procedure:

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super

2. Now animate the jumping man! Use the commands wait and cs to stop and start. Look at the solution below.

Type in: repeat 20 [jumpman1 wait 10 cs jumpman2 wait 10 cs jumpman3 wait 10 cs] then press Enter. Is he jumping? ______________

42


• section 4: advanced designs •

activity 26

Spirals

1. Use a pencil and paper to draw a spiral square pattern like the one below. You will see that the pattern hinges on turning at a set angle (the same angle) but drawing a longer line each time! Think about this as you are drawing.

or eBo st r e p ok u S

ew i ev Pr

Teac he r

my spiral drawing

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

m . u

w ww

When drawing a spiral, if LOGO is in wrap mode, the turtle will continue forever and not stop. You need to make sure LOGO is in fence mode when creating spirals. To change modes, simply type in: fence or wrap into THE COMMANDER OUTPUT. 2. Instruct LOGO to draw a spiral. Write the instructions below. Draw what you have created.

. te o My command My spiral c . che e r o r st super

43


• section 4: advanced designs •

activity activity27

Stars

Remember! Use the repeat command to shorten instructions. 1. Can you create a procedure to make a 5-pointed star? There is more than one procedure that works. Compare your procedure with a friend’s procedure. Are they the same? Can you teach LOGO to star?

or eBo st r e p o u k ______________________________________________ S ______________________________________________

ew i ev Pr

Teac he r

______________________________________________

2. Now adjust your procedure to create a 6-pointed star, then a 7-pointed star.

© ReadyEdPubl i cat i ons ______________________________________________ •f or r evi ew pur posesonl y• ______________________________________________

w ww

m . u

______________________________________________ ______________________________________________

. te

o c . che e r o r st Your teacher has super

3. ANIMATE! Can you make a flashing coloured star? Tip: You will need to use the wait command. Teach LOGO to star to make it easier. Write the procedure below.

the answers

44


Section Five:

Teac he r

ew i ev Pr

Moving The or eBo st r e pWith ok Turtle u S Co-ordinates

© ReadyEdPubl i cat i ons •f orr evi ew pur poses0o nl y• 100 Plus Y

100 (0,0)

w ww

Minus X

. te

setxy - 100

Plus X

m . u

setxy - 100

setxy 10

-100 setxy 100

-100

o c . che e r o r st super Minus Y

45


• section 5: moving the turtle with coordinates •

Using Co-ordinates 1

activity 28

The turtle is at the centre of a world which is also defined by coordinates. Any point to the right of its starting point is a positive number for x. Anything to the left is a negative number. The Y scale is measured up and down. Going up from the centre are increasing positive numbers and going down are increasing negative numbers. By using these facts we can put the turtle anywhere in the screen by defining its position.

Instruction

This moves the turtle to a spot left or right.

ew i ev Pr

sety

setx 100

Teac he r

setx

or eDescription st Bo r e p ok u S

Example

sety 237

This moves the turtle to a spot left or right.

setxy

setxy 33 147

setxy setpos [x y] This sets both the x and the y positions at once and combines setx and sety.

setpos [x y]

setpos [100 50]

Does the same as setxy.

© ReadyEdPlus Pu l i cat i ons Yb •f orr evi ew pur posesonl y• setxy 100 100

w ww

Minus X

m . u

setxy - 100 100 (0,0)

. te

Plus X

o c . che e r o setxy 100 -100 setxy - 100 -100 r st super Minus Y

TT Draw a square using co-ordinates. Try starting with setx 200. Write the procedure below.

______________________________________________ ______________________________________________

46


• section 5: moving the turtle with coordinates •

activity 29

Using Co-ordinates 2

Any rotations, flips or translations done on paper can be done using LOGO. A given symmetrical design say on the left can be reproduced by students to the right of the axis. If done in the top right quadrant, only positive coordinates need be used. TT Try creating this diagram using coordinates. Write the coordinates you used below.

or eBo st r e square will represent p10, 20 or 50 steps. ok u S

ew i ev Pr

Teac he r

Top Tip! Draw it on grid paper first. Each

w ww

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

. te o _____________________________________________________________ c . che e r _____________________________________________________________ o r st super _____________________________________________________________ _____________________________________________________________ _____________________________________________________________ _____________________________________________________________ _____________________________________________________________

47


• section 5: moving the turtle with coordinates •

activity 30

Coordinated Taxi

TT Can you create the yellow taxi below using co-ordinates? Work with a friend. Write your attempts below.

or eBo st r e p ok u S

ew i ev Pr

Teac he r

Top Tip! Draw the taxi first on graph paper based on units of 50 steps.

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r stYour teacher has super the answers

48


• section 5: moving the turtle with coordinates •

activity 31

Setting The Turtle’s Heading

The turtle can turn 360 degrees (more if you wish). The turtle can be made to point in a particular direction from its starting point.

setheading = number of degrees you want the turtle to turn Examples:

setheading 90

Straight up is 0° or 360°

setheading 341.765

To the right is 90°

short form: seth

Straight down is 180°

or eBo st r e p ok u S

Pointing to the left is 270°

ew i ev Pr

Teac he r

1. Can you make a similar circular shape to the one below by using setheading?

Type in: repeat 50 [setheading random 360 fd 200 bk 200]. Now put the procedure into the memory by typing in: to yarn and the line above, add a line to make the pen colour random as well. Check that it works.

w ww

2. Teach LOGO how to funyarn.

to funyarn

. te

describe what happens!

o c . che e r o r st super

repeat 20 [yarn wait 30 cs] end

3. Try this!

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

to manyyarn

draw!

repeat 20 [yarn] end 4. Now take some time to experiment. 49


Answers P.16 Drawing & Doodling - Activity 1 1.

or eBo st r e p ok u S

2. Possible answer to create the arrow: fd 200 rt 135 fd 50 bk 50 lt 270 fd 50 bk 50

P. 17 Sticks, Dashes & Stairs - Activity 2 Shape D (bold stairs) setpensize [6 6] fd 80 pu rt 90 fd 40 lt 90 pd fd 80 pu rt 90 fd 40 lt 90 pd fd 80 pu rt 90 fd 40 lt 90 pd

1. to dog rectangle rt 180 square bk 100 rt 90 square bk 300 lt 90 fd 100 square home end

ew i ev Pr

3. Possible answer to create the doubleheaded arrow: fd 200 rt 135 fd 50 bk 50 lt 270 fd 50 bk 50 lt 45 fd 200 lt 135 fd 50 bk 50 lt 90 fd 50

Teac he r

P.20 Squares & Rectangles 3 - Activity 5 Before students attempt any shape, they should make sure the turtle knows how to square and rectangle: to square repeat 4[fd 100 rt 90] end to rectangle repeat 2 [ fd 100 rt 90 fd 300 rt 90] end

2. to stack rectangle fd 100 rectangle fd 100 rt 90 fd 100 lt 90 square pu home pd end

© ReadyEdPtou bl i cat i ons H r ltp 90o rectangle •f orr evi ew pu sesonl y• rt 90 fd 100

. te

square rt 90 fd 100 lt 90 bk 100 rt 90 fd 100 lt 180 rectangle pu home pd end

m . u

w ww

P.19 Squares & Rectangles 2 - Activity 4 1. square fd 100 square fd 100 square fd 100 lt 90 fd 100 lt 90 fd 300 lt 90 fd 100 end

o c . che e r o r st super

2. Shape 1: square fd 100 square fd 100 square fd 100 rt 90 fd 100 square end Shape 2: square fd 100 rt 90 fd 100 lt 90 square end

P.22 Flags 2 - Activity 7 1. 8 armed flag to spinflag repeat 8[flag rt 45] end

P.23 Triangles 1 - Activity 8 Step 1: A triangle is not drawn. Half a hexagon is drawn instead. To draw an equilateral triangle, you turn the turtle120 degrees because it is the obtuse angle that is used = repeat 3 [fd 83 rt 120]. Extension: hexagon = repeat 6 [fd 50 rt 60]

50


P.24 Triangles 2 - Activity 9 3. to house square fd 100 rt 45 fd 70 rt 90 fd 70

P.31 Tessellations 2 - Activity 15 See P32 for answers

P.33 Transformations - Activity 17 (Shape B is nested in Shape A and Shape B in Shape C)

to rocket lt 90 triangle lt 90 fd 166 rt 90 fd 83 rt 90 fd 166 end

Do the same on the other side but use left. Use pu home pd, to move around.

to shapeb shapea pu rt 90 fd 400 lt 90 fd 100 lt 90 pd shapea end

ew i ev Pr

or eBo st r e p ok u S

To draw the rocket, position the turtle 150 steps down from the top of the rectangle on each side. To draw triangles, one to the left and one to the right, try: rt 180 fd 150 lt 270 fd 100 rt 135 fd 140

Teac he r

To shapea fd 100 repeat 4[ lt 90 fd 40] fd 100 rt 90 fd 100 rt 90 fd 40 rt 90 fd 100 rt 90 bk 190 end

© ReadyEdPubl i cat i ons to shapec •f orr evi ew pur posesonl y• shapeb

w ww

P.27 Colour 1 - Activity 11 4. pensize [1 1] is thin; pensize [5 5] is thick.

. te

pu home bk 200 pd rt 180 fd 100 repeat 4[rt 90 fd 40] fd 100 lt 90 fd 100 lt 90 fd 40 lt 90 fd 100 lt 90 bk 190 end

m . u

P.25 Triangles 3 - Activity 10 3. Triangle d is not an equilateral triangle. It is a scalene triangle with all sides different lengths.

o c . che e r o r st super

P.28 Colour 2 - Activity 12 3. A green rectangle

P.29 Randomness - Activity 13 Various answers because the turtle is producing colours at random.

P.30 Tessellations 1 - Activity 14 3. to stair4 repeat 4 [stair] lt 90 fd 200 rt 180 stair stair bk 400 stair stair end

P.35 Polygons 1 - Activity 18 1. hexagon = 60 degrees; octagon = 45 degrees; nonagon = 40 degrees 2. The first polygon (octagon) is larger because each side is longer (fd 87).

P.36 Polygons 2 - Activity 19 2. heptagon = repeat 7[ fd 56 lt 360/7] There are other possibilities.

51


P.37 Polygons 3 - Activity 20 2. A ,B, C Students should note that the more complex shape repeats the hexagon the highest number of times. 3. No

P.38 Variables - Activity 21 1. [n n]

to fishes :n repeat :n [fish pu lt 30 fd 120 lt 90 fd 30 rt 180 pd] end to beach cs pu fd 100 rt 90 fd 250 lt 90 pd birds 4 pu home rt 90 fd 250 lt 90 pd waves 16 pu home rt 90 fd 200 rt 90 fd 100 rt 180 pd fishes 5 ht end

or eBo st r e p ok u S

P39 Circles & Arcs 1 - Activity 22 1. fd stands for forward; rt stands for turn right 3. 180 stands for 180 degrees which is the degrees of a semi-circle

ew i ev Pr

Teac he r

2. repeat 4 [fd :l rt 90]

to fish rt 45 arc2 60 100 rt 135 arc2 60 100 end

3. flower The flower is built up in three parts using both arc and arc2. It would be improved with the step procedure shown later. to petal arc2 60 180 rt 120 arc2 60 180 end to flower repeat 3 [petal] rt 60 repeat 3 [petal] end

w ww

to bird lt 45 arc 90 50 lt 45 pu fd 70 pd rt 45 arc 90 50 end

. te

to flower2 arc 360 20 pu fd 20 pd petal pu home pd rt 45 pu fd 20 pd petal pu home pd rt 90 pu fd 20 pd petal pu home pd rt 135 pu fd 20 pd petal pu home pd rt 180 pu fd 20 pd petal pu home pd rt 225 pu fd 20 pd petal pu home pd rt 270 pu fd 20 pd petal pu home pd rt 315 pu fd 20 pd petal pu home end

o c . che e r o r st super

to birds :n repeat :n [bird pu fd 40 rt 45 pd] end to wave lt 45 arc 90 30 end to waves :n repeat :n [wave pu lt 45 fd 40 rt 90 pd] end 52

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

P.40 Circles & Arcs 2 - Activity 23 2. beach scene This can be a long process. The class could be put into three groups. Each writing a small program for each step (to bird; to wave; to fish) Finally put programs together with suitable turtle movements between them to create the beach scene.


P. 41 Animations 1 - Activity 24 Square and flag need to be loaded or redefined. A colour could be added. to windmill ( This shows all the flags) repeat 8[ flag wait 60 rt 360/8] end to windmill2 ( This shows only one flag at a time) repeat 8[ flag wait 60 clean rt 360/8] end

or eBo st r e p ok u S

to jumpman2 lt 90 circle2 40 lt 90 fd 200 bk 150 rt 30 fd 100 bk 100 lt 60 fd 100 bk 100 rt 30 fd 150 rt 10 fd 100 bk 100 lt 20 fd 100 bk 100 ht end

P44 Stars - Activity 27 1. to star5 repeat 5 [fd 50 rt 360/5 *2 fd 50 lt 360/5] end 2. to star6 repeat 6 [fd 50 rt 360/6 *2 fd 50 lt 360/6] end

ew i ev Pr

P.42 Animations 2 - Activity 25 to jumpman1 lt 90 circle2 40 lt 90 fd 200 bk 150 rt 90 fd 100 bk 200 fd 100 lt 90 fd 150 rt 30 fd 100 bk 100 lt 60 fd 100 bk 100 ht end

Teac he r

to spiral fd 30 rt 90 fd 35 rt 90 fd 40 rt 90 fd 45 rt 90 fd 50 rt 90 fd 55 rt 90 fd 60 end

to star7 repeat 7 [fd 50 rt 360/7 *2 fd 50 lt 360/7] end

3. to flashingstar © ReadyEdPu bl i cat i ons repeat 5 [setscreencolour random 15 star fd 5 rt 90 pu rt 45 fd 30 •f orr evi ew pur posesonl y• setfloodcolour random 15 fill pd wait 30 cs

. te

wait 30] end

m . u

w ww

to jumpman3 lt 90 circle2 40 lt 90 fd 200 bk 150 rt 150 fd 100 bk 100 lt 300 fd 100 bk 100 rt 150 fd 150 rt 90 fd 100 bk 100 lt 180 fd 100 bk 100 ht end

P46 Using Co-ordinates 1 - Activity 28 1. to square setx 200 sety 200 setx -5 sety -15

o c . che e r o r st super

to jumpy jumpman1 wait 60 cs repeat 20 [jumpman1 wait 10 cs jumpman2 wait 10 cs jumpman3 wait 10 cs] jumpman1 end

P43 Spirals 1 - Activity 26 This is an example to show that to make a spiral forward steps need to be increased each time

P.47 Using Co-ordinates 2 - Activity 29 1. to shape pu setxy 100 100 pd setxy -100 100 setxy -100 -100 setxy 100 -100 sety 100 pu setxy 100 100 pd setxy -400 -400 pu setxy -100 100 pd setxy 400 -400 setxy -400 -400 53


pu home

P.48 Coordinated Taxi Activity 30 The first part makes the shape. Yellowtaxi2 puts in the wheels and colour.

or eBo st r e p ok u S

to yellowtaxi2 pu setxy -225 -25 lt 90 pd arc 180 50 setfloodcolour 0 fill pu setxy 225 -25 pd arc 180 50 setfloodcolour 0 fill pu ht home setfloodcolour 6 fill end

ew i ev Pr

Teac he r

to yellowtaxi1 pu setxy -200 200 pd setxy -300 100 setxy -400 100 setxy -400 -50 setxy -300 -50 setxy -250 0 setxy -200 0 setxy -150 -50 setxy 150 -50 setxy 200 0 setxy 250 0 setxy 300 -50 setxy 350 -50 setxy 400 -50 setxy 400 0 setxy 300 100 setxy 250 100 setxy 200 200 setxy -200 200 end

w ww

. te

54

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super


Teac he r

ew i ev Pr

or eBo st r e p ok u S

w ww

. te

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super

55


Teac he r

ew i ev Pr

or eBo st r e p ok u S

w ww

. te

56

m . u

© ReadyEdPubl i cat i ons •f orr evi ew pur posesonl y•

o c . che e r o r st super


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.