22
2015 © onefourseven education llp 1 Unit 1_KS2_Logo project.docx Unit 1: KS2 Logo project 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

Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 1 Unit 1_KS2_Logo project.docx

Unit 1: KS2 Logo projectOverviewA unit of activities in which children are introduced to computer science through the use of Logo a text basedprogramming language. They will learn to how to control an on-screen turtle by giving it instructions. They willprogramme 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 timeto consolidate their knowledge, skills and understanding. This unit deliberately provides a substantial number of opportunities for childrento 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

LessonsLesson 1: Introducing Logo................................................................................................................................................................ 2Lesson 2: 2D shapes ......................................................................................................................................................................... 3Lesson 3: Turtle drawing.................................................................................................................................................................... 4Lesson 4: Using abbreviations ........................................................................................................................................................... 5Lesson 5: Using repeat ...................................................................................................................................................................... 6Lesson 6: Regular polygons............................................................................................................................................................... 7

Page 2: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 2 Unit 1_KS2_Logo project.docx

Lesson 1: Introducing LogoThe children are introduced to Logo, a text based programming language and learn how to give an on-screen turtle instructions toachieve a desired outcome; they will learn how to program the turtle graphic move forward over a fixed distance with accuracy.

Teaching objective: create test and modify a sequence instructions to achieve a given outcome (Y2)

Resources: Onscreen Logo (FMS Logo or MSW Logo), Programme record 1

Teaching activityLogo 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 commandline. 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 mainscreen. Record the children’s initial suggestions progressively and demonstrate how to enter the command primitive (forward) followedby a number (integer) in the command line and press <enter> on the keyboard. Keep a record of their programme as it develops and theturtle 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 theturtle. 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 workUsing the primitives ‘forward’, back’ and ‘clearscreen’ the children estimate and command the turtle graphic to move to the top of themain screen area, recording their work as it progresses. They can amend their work using ‘back’ and ‘clearscreen’ and test their resultwhen they have reached a conclusion.

PlenaryDiscuss the activity with the children, what things can affect the success or otherwise of the instructions that they enter to make the turtlemove. What can they do to avoid and or correct mistakes that they make?

Page 3: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 3 Unit 1_KS2_Logo project.docx

Lesson 2: 2D shapesIn this activity the children will build on their knowledge using a text based programming language and how to program the turtle graphicto move forward and input sequences of instructions, individually or grouped together to make the turtle move and turn to achieve arange of desired outcomes.

Teaching objective: create test and modify a sequence instructions to achieve a given outcome (Y2); plan asequence of instructions that can be grouped together for efficiency.

Resources: On-screen Logo (FMS Logo or MSW Logo), Programme record 2

Teaching activityPrimitives: 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 moveforward 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 toturn 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 onthe screen and reposition the turtle in the centre of the screen in order to start again.

Group/paired workUsing the primitives ‘forward’, ‘back’, ‘right’, ‘left’, and ‘clearscreen’ ask the children to programme the turtle to draw a square the childrenshould record heir programme as it progresses. Once complete ask the children to draw a rectangle and or a variety of different sizesquares and rectangles. They should keep a record of their programme for each.

PlenaryTell the children that each set of instructions that they developed to solve the problem is known as an algorithm. As before discuss theactivity with the children, what things can affect the success or otherwise of the instructions that they enter to make the turtle move. Whatcan 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 draweither a rectangle or square in one movement (type the entire set of instructions in the command line before pressing <enter> on thekeyboard).

Page 4: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 4 Unit 1_KS2_Logo project.docx

Lesson 3: Turtle drawingIn this activity the children the children will practise programming an on-screen turtle graphic to achieve a range of outcomes. Thechildren will record their work as it progresses.

Teaching objective: understand that an algorithm is a step-by-step list of directions that need to be followed tosolve a problem

Resources: On-screen Logo (FMS Logo or MSW Logo, Programme records 3 – 6

Teaching activityPrimitives: 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 newproject.

Introduce Programme record 3. Tell the children that you want them to develop algorithms to solve different drawing problems using theturtle graphic. That they will need to develop a programme using a sequence of step by step instructions and that there is more than oneway to solve each problem

Group/paired workWorking with a partner the children complete one or more of the Programme record sheets (3 – 6) developing, testing and recording theirown solutions for drawing the different shapes

PlenaryReview some of the programming solutions, the algorithms that the children developed. Compare similarities and differences betweenthe solutions (their algorithms) developed to solve the same problem.

Page 5: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 5 Unit 1_KS2_Logo project.docx

Lesson 4: Using abbreviationsThis is a practice lesson where the children continue develop their skills using a text base programming language to instructing the turtleto draw progressively more challenging patterns and designs. The children will also extend their knowledge of Logo programmingprimitives and will also be introduced to the abbreviations for each enabling them write longer and more complex programmes with morespeed and fewer errors

Teaching objective: understand that an algorithm is a step-by-step list of directions that need to be followed tosolve a problem; find different ways to solve a problem

Resources: On-screen Logo (FMS Logo or MSW Logo, Programme records 7 – 8

Teaching activityPrimitives: 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 shapeson 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 onscreen as it moves. Also introduce the children to ‘hideturtle’ and ‘showturtle’ and demonstrate how these can be used in their work.

Group/paired workWorking with a partner the children complete one or more of the Programme record sheets (7 – 8) developing, testing and recording theirown solutions for drawing the different shapes

PlenaryReview some of the programming solutions, the algorithms that the children developed. Compare similarities and differences betweenthe solutions (their algorithms) developed to solve the same problem.

Page 6: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 6 Unit 1_KS2_Logo project.docx

Lesson 5: Using repeatThe children are introduced to the repeat command as a means of grouping sequences of instructions within an algorithm together moreefficiently. They will use repeat and their knowledge mathematics, in particular shape, angles and number to design algorithm that usethe repeat command to draw regular polygons. They can then use this understanding of repeat and see if they are able to improve anyof their previous programming work.

Teaching objective: identify where a program benefits from commands being grouped; investigate how repeatcommands can be used within sequences of instructions to achieve desired effects in a range of contexts

Resources: On-screen Logo (FMS Logo or MSW Logo, Programme records 9

Teaching activityReview a programming solution for drawing a square (Programme record 2, solution 2b) and ask the children to identify which elementsof the programme are being repeated and how many times, (forward 100 right 90 is repeated four times). Ask them to explain why theythink this is (a square has four equal sides and four equal corners, this element of the programme instructs the turtle to draw one sideand turn one corner, if it repeats this element four times it will draw a square). Introduce the repeat command as a way to more efficientlygroup commands together (repeat 4 [forward 100 right 90]) emphasise the need to use square brackets to define exactly whichcommands needs to be repeated.

Group/paired workIn 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 byincorporating repeats.

PlenaryReview some of the programming solutions, the algorithms that the children developed. Compare similarities and differences betweenthe solutions (their algorithms) developed to solve the same problem. Discuss with the children the benefit of using repeat within analgorithm.

Page 7: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 7 Unit 1_KS2_Logo project.docx

Lesson 6: Regular polygonsThe children will practice their use of repeat. Using their understanding of how to use repeat within and algorithm to instruct the onscreenturtle to draw a square together with their knowledge of mathematics, in particular shape, angles and number the children will carry out aseries of calculations and develop algorithms using repeat to instruct the turtle graphic to drawn any regular polygon.

Teaching objective: Investigate how repeat commands can be used within sequences of instructions to achievedesired effects in a range of contexts; Plan sequences of instructions that can be grouped together forefficiency

Resources: On-screen Logo (FMS Logo or MSW Logo, Regular polygons sheet

Teaching activityReview a programming solution for drawing a square (Programme record 2, solution 2b), then review the algorithm using a repeat fordrawing a square (repeat 4 [fd 100 rt 90]) Discuss with the children why the algorithm specifically repeats four times (a square has fourequal sides and four equal corners). Ask the children if they can suggest what repeat might need to be used to instruct the turtle graphicto draw a triangle encourage them to explain why. Ask the children if they can suggest an algorithm that uses repeat that will instruct theturtle 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 turtlegraphic 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 bethe case (a square has four equal corners) Point out that 360° ÷ 4 = 90 can they suggest what sum they might use to calculate the angleof turn for a triangle. (360° ÷ 3)

Group/paired workIn pairs the children calculate the required angles and develop algorithms to instruct the turtle graphic to draw a triangle and other regularpolygons

PlenaryReview he children’s work. Compare similarities and differences between the solutions (their algorithms) developed to solve the sameproblem.

Page 8: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 8 Unit 1_KS2_Logo project.docx

Name

Programme record 1Develop a series of instructions to draw using the turtle graphic.Record your algorithm and draw your shape.

Page 9: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 9 Unit 1_KS2_Logo project.docx

Name

Programme record 2Develop a series of instructions to draw using the turtle graphic.Record your algorithm.

Page 10: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 10 Unit 1_KS2_Logo project.docx

Name

Programme record 3Develop a series of instructions to draw using the turtle graphic. Record your algorithm.

Page 11: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 11 Unit 1_KS2_Logo project.docx

Name

Programme record 4Develop a series of instructions to draw using the turtle graphic. Record your algorithm.

Page 12: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 12 Unit 1_KS2_Logo project.docx

Name

Programme record 5Develop a series of instructions to draw using the turtle graphic. Record your algorithm

Page 13: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 13 Unit 1_KS2_Logo project.docx

Name

Programme record 6Develop a series of instructions to draw using the turtle graphic

Page 14: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 14 Unit 1_KS2_Logo project.docx

Name

Programme record 7Develop a series of instructions to draw using the turtle graphic

Page 15: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 15 Unit 1_KS2_Logo project.docx

Name

Programme record 8Develop a series of instructions to draw using

Page 16: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 16 Unit 1_KS2_Logo project.docx

Name

Programme record 9Develop algorithms that use repeat to instruct the turtle graphic to draw a square and rectangle

Page 17: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 17 Unit 1_KS2_Logo project.docx

Name

Programme record 10Develop algorithms that use repeat to instruct the turtle graphic to draw these shapes.

Page 18: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 18 Unit 1_KS2_Logo project.docx

Name

Regular polygonsA square has 4 equal corners and 4 straight sides ofequal length.

To draw a square, the turtle must make four 90 turns,and turn a total of 360°

360 ÷ 4 = 90

An algorithm to draw a square might look like:repeat 4 [fd 100 rt 90]

To draw any regular polygon the turtle must always turn a total of 360°. Can youdevelop 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?

Page 19: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 19 Unit 1_KS2_Logo project.docx

Useful Logo commandsfd = Forward

bk = back

rt = right

lt = left

When an instruction has more than one part it is important to use spaces between theindividual commands or primitives, e.g. fd 50 (the turtle will move forward 50 steps)

Other useful primitivescs = clearscreen clears all drawing and returns he turtle to its original

positionct = cleartext clears any command from the command window

pu = penup the turtle stops drawing a trail

pd = pendown the turtle starts to draw a trail

ht = hideturtle hides the turtle on the screen

st = showturtle shows the turtle on the screen

repeat [ ] repeats any commands typed inside squarebrackets [ ]

setpc = setpencolorsetfc = setfillcolor followed by an integer (number) changes the colour

of the line drawnpe = penerase followed by an integer (number) changes the flood

fill colourppt = penpaint the turtle will rub out any line it move along

fill flood fills the regionbelow the turtle

instructs the turtle to start painting, drawing a line

clean clears all drawing but leaves the turtle in its current position

Page 20: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 20 Unit 1_KS2_Logo project.docx

Possible solutions

Programme record 2Solution a Solution b Solution a Solution bforward 100right 90forward 100right 90forward 100right 90forward 100right 90

forward 100 right 90forward 100 right 90forward 100 right 90forward 100 right 90

forward 100right 90forward 200right 90forward 100right 90forward 200right 90

forward 100 right 90forward 200 right 90forward 100 right 90forward 200 right 90

Programme record 3 Programme record 4Solution a Solution b Solution a Solution bforward 100left 90forward 100left 100forward 100left 90forward 100left 90forward 50Left 90forward 50left 100forward 50left 90forward 50left 90forward 25Left 90forward 25left 90forward 25left 90forward 25left 90

forward 100 Left 90forward 100 left 90forward 100 left 90forward 100 left 90forward 50 Left 90forward 50 left 90forward 50 left 90forward 50 left 90forward 25 left 90forward 25 left 90forward 25 left 90forward 25 left 90

forward 100right 90forward 200right 90forward 100right 90forward 200right 90forward 50right 90forward 100right 90forward 50right 90forward 100right 90forward 25right 90forward 50right 90forward 25right 90forward 50right 90

forward 100 right 90forward 200 right 90forward 100 right 90forward 200 right 90forward 50 right 90forward 100 right 90forward 50 right 90forward 100 right 90forward 25 right 90forward 50 right 90forward 25 right 90forward 50 right 90

Programme record 5 Programme record 6Solution a Solution b Solution a Solution bforward 50right 90forward 50left 90forward 50right 90forward 50left 90forward 50right 90forward 50left 90forward 50right 90forward 50left 90

forward 50 right 90forward 50 left 90forward 50 right 90forward 50 left 90forward 50 right 90forward 50 left 90forward 50 right 90forward 50 left 90

forward 100left 90forward 50right 90forward 50right 90forward 150right 90forward 50right 90forward 50left 90forward 100right 90forward 50right 90

forward 100 left 90forward 50 right 90forward 50 right 90forward 150 right 90forward 50 right 90forward 50 left 90forward 100 right 90forward 50 right 90

Page 21: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 21 Unit 1_KS2_Logo project.docx

Possible solutions

Programme record 7 Programme record 8Solution a Solution b Solution a Solution bpult 90fd 200rt 90pd

fd 100lt 90fd 100lt 90fd 100lt 90fd 100lt 90

purt 90fd 50lt 90pd

fd 50lt 90fd 50lt 90fd 50lt 90fd 50lt 90

purt 90fd 50lt 90pd

fd 25lt 90fd 25lt 90fd 25lt 90fd 25lt 90

pult 90fd 200rt 90pd

fd 100 lt 90fd 100 lt 90fd 100 lt 90fd 100 lt 90

purt 90fd 50lt 90pd

fd 50 lt 90fd 50 lt 90fd 50 lt 90fd 50 lt 90

purt 90fd 50lt 90pd

fd 25 lt 90fd 25 lt 90fd 25 lt 90fd 25 lt 90

fd 100rt 90fd 100rt 90fd 100rt 90fd 100rt 90

purt 90fd 10lt 90fd 10pd

fd 20rt 90fd 80rt 90fd 20rt 90fd 80rt 90

pufd 50pd

fd 30rt 90fd 30rt 90fd 30rt 90fd 30rt 90

purt 90fd 50lt 90pd

fd 30rt 90fd 30rt 90fd 30rt 90fd 30rt 90

ht

fd 100 rt 90fd 100 rt 90fd 100 rt 90fd 100 rt 90

purt 90 fd 10lt 90 fd 10pd

fd 20 rt 90fd 80 rt 90fd 20 rt 90fd 80 rt 90

pufd 50pd

fd 30 rt 90fd 30 rt 90fd 30 rt 90fd 30 rt 90

purt 90fd 50lt 90pd

fd 30 rt 90fd 30 rt 90fd 30 rt 90fd 30 rt 90

Page 22: Unit 1: KS2 Logo project - onefourseven websiteonefourseven.org.uk/members/wp-content/uploads/... · The ‘clearscreen’ primitive will delete any trails that are visible on the

2015 © onefourseven education llp 22 Unit 1_KS2_Logo project.docx

Possible solutions

Programme record 9Solution Solution

repeat 4 [fd 100 rt 90] Repeat 2 [fd 100 rt 90 fd 200 rt 90]

Programme record 10Solution Solution

repeat 4 [fd 100 rt 90]repeat 4 [fd 50 rt 90]repeat 4 [fd 25 rt 90]

Repeat 2 [fd 100 rt 90 fd 200 rt 90]Repeat 2 [fd 50 rt 90 fd 100 rt 90]Repeat 2 [fd 25 rt 90 fd 50 rt 90]