Page 65 - Computer Class 04
P. 65

7 7 7           Moving with Turtle Moving with Turtle Moving with Turtle












             Logo is pronounced as Low-go and is a high level programming language

             known  for  its  graphics  capabilities,  created  by  Seymour  Papert  in  1967.
             Logo  is  often  used  for  young  school  children  as  a  basic  method  of

             programming instructions into a computer to create a graphic.

             Below, are the instructions used to create a square.


                     Forward 100
                                                                                      Forward 100
                         Right 90                                    Right 90                              Right 90
                     Forward 100


                         Right 90
                                                                     Forward                                Forward
                     Forward 100                                       100                                    100


                         Right 90                                                                          Right 90

                     Forward 100                                                   Square in Logo

             The  most  popular  Logo  environment  has  involved  the  Turtle,  originally  a

             robotic creature that moved around on the floor.

             It  can  be  directed  by  typing  commands  at  the  computer.  The  command
             forward 100 causes the turtle to move forward in a straight line 100 “turtle

             steps”. Right 45 rotates the turtle 45 degrees clockwise while leaving it in

             the same place on the floor. Then forward 50 causes it to go forward 50
             steps in the new direction.


             With just the two commands forward and right, the turtle can be moved in
             any path across the floor. The turtle also has a pen which may be lowered

             to the floor so that a trace is left of where it has travelled. With the pen

             down, the turtle can draw geometrical shapes, pictures and designs of all
             sorts.




                                                                                    Computer-4              65
   60   61   62   63   64   65   66   67   68   69   70