DOC PREVIEW
CSUDH TBE 540 - Logo Lesson 1

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Logo Lesson 1 TBE 540 40 Fall 2004 Farah Fisher What is Logo A programming language instructions to the computer to perform a task Created at MIT during a study of artificial intelligence see http el media mit edu logo foundation logo index ht ml Can be used by virtually any student from young children through engineering students Can be used to create pictures display text or perform calculations Some versions can even make music What is Logo When Logo is used to create pictures commands are given to a robot turtle Some samples of the turtle shape What does Logo look like The simplest form of Logo uses movement commands to control the robot turtle Sample commands FD or FORWARD moves the turtle forward BK or BACK moves the turtle backwards RT or RIGHT turns the turtle to the right LT or LEFT turns the turtle to the left What does Logo look like Each movement command FD BK RT LT needs more information FD and BK both require a number which indicates the turtle steps to move steps are very small RT and LT both require the number of degrees in the turn Examples notice the space after the command FD 50 move forward 50 turtle steps LT 90 turn left 90 degrees What does Logo look like As the turtle moves it leaves a trail on the screen These trails make shapes Imagine for a moment that you are walking around the bases of a baseball diamond about 30 steps on each side Assume that you are walking forward from base to base Are you turning left or right Go to the next slide when you finish What does Logo look like In walking around the baseball diamond in your imagination you probably followed these steps written as they would be in Logo FD 30 home to 1st base LT 90 turn toward 2nd base FD 30 1st base to 2nd base LT 90 turn toward 3rd base FD 30 2nd base to 3rd base LT 90 turn toward home FD 30 3rd base to home Imagine that you were dragging a paint brush when you walked What shape would you have drawn What does Logo look like The commands below would make a square turtle shown at the end FD 30 LT 90 FD 30 LT 90 FD 30 LT 90 FD 30 What shapes would these make SHAPE 1 FD 30 RT 90 FD 60 SHAPE 2 RT 90 FD 50 LT 90 FD 50 SHAPE 3 FD 50 LT 60 FD 50 SHAPE 4 FD 100 RT 45 FD 50 Try these with pencil and paper Click to check your answers What shapes would these make SHAPE 1 FD 30 RT 90 FD 60 SHAPE 2 RT 90 FD 50 LT 90 FD 50 SHAPE 3 FD 50 LT 60 FD 50 SHAPE 4 FD 100 RT 45 FD 50 The REPEAT Command When you walked around the bases you may have noticed that the Logo commands were repeated The REPEAT command is used as a shortcut in place of writing out repeated commands Example REPEAT 2 FD 50 RT 90 is the equivalent of FD 50 RT 90 FD 50 RT 90 Notice that the number of repeats comes first with the commands to be repeated inside square brackets REPEAT Example To make a SQUARE FD 30 LT 90 FD 30 LT 90 FD 30 LT 90 FD 30 OR to make a SQUARE REPEAT 4 FD 30 LT 90 This version actually adds another LT 90 to the list but does not change the basic shape More about REPEAT You have seen that REPEAT 4 FD 30 LT 90 makes a square Guess the shapes made by the REPEAT commands below Click to see if you were right REPEAT 3 FD 30 LT 120 REPEAT 6 FD 30 LT 60 REPEAT 8 FD 30 LT 45 REPEAT 5 FD 30 LT 72 More about REPEAT REPEAT 3 FD 30 RT 120 REPEAT 6 FD 30 LT 60 REPEAT 8 FD 30 LT 45 REPEAT 5 FD 30 LT 72 Did you notice a pattern The number after REPEAT is the number of sides Examine the number of repeats and the number of degrees Try multiplying them together Example 4 sides x 90 turn The sides x degrees should always be the same number in the samples you tried Could you use this information to make a 10 sided figure Click for a possible answer Did you notice a pattern REPEAT 10 FD 30 LT 36 should make a 10 sided figure Why Look at the total turtle turns below REPEAT 3 FD 30 LT 120 REPEAT 6 FD 30 LT 60 REPEAT 8 FD 30 LT 45 REPEAT 5 FD 30 LT 72 REPEAT 10 FD 30 LT 36 3 x 120 360 6 x 60 360 8 x 45 360 5 x 72 360 10 x 36 360 When the turtle makes a closed figure no breaks in the sides the total turns add up to 360 degrees Logo and Critical Thinking You have just seen an example of the use of Logo to enhance critical thinking Your students and you too can be challenged to write the sequential steps needed to make shapes look for patterns predict outcomes all part of critical thinking Watch for more examples of critical thinking as you learn Logo Changing Things Here is another prediction task for you You have seen that to make a square you can use REPEAT 4 FD 30 LT 90 Do you think the same commands would work if you turned RT instead of LT How could you make a square larger What would you have to change After you have made predictions go to the next slide Were you correct REPEAT 4 FD 30 LT 90 REPEAT 4 FD 10 LT 90 REPEAT 4 FD 50 LT 90 REPEAT 4 FD 30 RT 90 Controlling the Logo Pen When the Logo turtle moves it usually draws with a pen This pen can be down draws a line or up does not draw a line If the pen is up the turtle moves without drawing The pen can also become an eraser remove a line already drawn The pen color abd background can be changed Pen Control Commands PU PENUP subsequent movements of the turtle will not leave a line PD PENDOWN subsequent movements of the turtle will leave a line PE PENERASE subsequent movements of the turtle will erase any line it crosses PPT or PP PENPAINT used by some versions of Logo to undo PENERASE Logo Challenge How could you use PU and PD to make a dashed line like the middle of a road Think about this problem for awhile then click for a possible answer Try making the pattern below turtle always starts pointed up with the pen down Logo Challenge Two possible solutions for this shape RT 90 FD 25 PU FD 25 PD FD 25 PU FD 25 PD FD 25 PU FD 25 PD FD 25 NOTE Logo commands can be placed on the same line Alternate using REPEAT RT 90 REPEAT 4 …


View Full Document

CSUDH TBE 540 - Logo Lesson 1

Download Logo Lesson 1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Logo Lesson 1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Logo Lesson 1 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?