LOGO language's basic commands

0

LOGO language's basic commands

Here are some of us in the LOGO language in the most basic graphics commands:

  1. And the mobile command: "forward" and "backward" and "returns." Advance orders for sea turtles can be moved forward a certain number of units, such as: the implementation of "Forward (forward) 50" orders, small turtles will move forward 50 units may be ordered back to sea turtles back on the move, if implemented " Back (back) 50 "order, then the small turtles in the direction will not change, but will retreat to the 50 units to the implementation of order, regardless of the location of the small turtles and what direction, it will return to the drawing Guaiguai District of central location, and towards the screen is at the top.
  2. And turn the command: "Turn right" and "turn left." Turn right order will allow small turtles as required right turn to a certain point of view, for example: the implementation of "Right (turn right) 45" order of the small turtles to the right turn towards the 45-degree angle, and can be ordered to turn left on the sea turtles Left turn, such as: the implementation of "Left 45" is an order of the small turtles towards the left will turn 45-degree angle. This order can drive several small turtles will rotate around its center point of view.
  3. And control of the relevant orders have REPEAT (repeat), IF… THEN… ELSE… (conditions for implementation). Such as the implementation of REPEAT 4 [FORWARD 200 RlGHT 9O] will be able to draw a square in Figure 2, if the order directly to mobile command and turn the combination, then write the phrase on more, but are repeated four times " Forward 100 "and" Right 90 "order.

Archive: