3. Commands > Basic LOGO Commands

3.1. COMMANDS | Command 1 | Command 2 | Command 3 | Command 4 | Command 5 | Command 6 | Command 7 | Command 8 | Command 9 | Command 10 |


ABOUT3.1.1. Command 1

Command: <FORWARD> or <FD>

Function: The forward command is used to move the turtle forward while drawing a line.

Syntax: FD <number of steps>

Example: FD 45 <Enter>

Result: Draws a 45 steps long line in the forward direction.

Back to Top


3.1.2. Command 2

Command: <BACK> or <BK>

Function: The back command is used to move the turtle backward while drawing a line.

Syntax: BK <number of steps>

Example: BK 40 <Enter>

Result: Draws a 40 steps long line while moving backwards.

Back to Top


3.1.3. Command 3

 
Command: <RIGHT> or <RT>

Function: Turns the turtle to its right through the specified number of degrees.

Syntax: RT <number of degrees>

Example: RT 90 <Enter>

Result: Turns the head of the turtle by 90° to its RIGHT.

Back to Top


3.1.4. Command 4

 
Command: <LEFT> or <LT>

Function: Turns the turtle to its left through the specified number of degrees.

Syntax: LT <number of degrees>

Example: LT 45 <Enter>

Result: Turns the head of the turtle by 45° to its LEFT.

Back to Top


3.1.5. Command 5

 
Command: <PENUP> or <PU>

Function: The PU command lifts the turtle's pen so that, it does not draw a line while moving.

Syntax: PU <Enter>

Back to Top


3.1.6. Command 6

 
Command: <PENDOWN> or <PD>

Function: The PD command puts the turtle's pen down so that it again starts drawing while moving. PD command is given only after PU command has already been used.

Syntax: PD <Enter>

Back to Top


3.1.7. Command 7

 
Command: <HIDETURTLE> or <HT>

Function: HT command hides the display of the turtle.

Syntax: HT <Enter>

 

Back to Top


3.1.8. Command 8

Command: <SHOWTURTLE> or <ST>

Function: ST command is used to display the turtle on the screen. It can be used only after the HT command has been used.

Syntax: ST <Enter>

 

Back to Top


3.1.9. Command 9

 
Command: <CLEARSCREEN> or <CS>

Function: CS command erases all the drawings on the scren and clears the Main screen or the Graphics screen, and also brings the turtle to the centre of screen.

Syntax: CS <Enter>

 

Back to Top


3.1.10. Command 10

 
Command: <REPEAT>

Function: REPEAT command allows to repeat a set of commands many times without writing them again and again.

Syntax: REPEAT <n> [Set of commands] <Enter>, where n is the number of times a set of commands has to be repeated.

Example: REPEAT 4 [FD 40 RT 90]

Result: The REPEAT command will run the commands FD 40 & RT 90 four times to complete the SQUARE.

Back to Top

 

  ©2005 FINA'S CO.  HOME

                      

Hosted by www.Geocities.ws

1