Catalog / Logo Programming Language Cheatsheet
Logo Programming Language Cheatsheet
A concise cheat sheet for the Logo programming language, covering basic commands, syntax, and concepts. Perfect for beginners learning turtle graphics and fundamental programming principles.
Basic Commands
Movement
|
Moves the turtle forward by |
|
Moves the turtle backward by |
|
Rotates the turtle clockwise by |
|
Rotates the turtle counter-clockwise by |
|
Lifts the pen, so the turtle moves without drawing. |
|
Lowers the pen, so the turtle draws as it moves. |
|
Returns the turtle to the center of the screen, pointing upwards. |
|
Clears the drawing area. |
Pen Control
|
Sets the pen color. |
|
Sets the pen size to |
|
Fills a closed shape with the current pen color. |
Turtle Visibility
|
Makes the turtle visible. |
|
Hides the turtle. |
Control Structures
Repetition
|
Repeats the specified Example:
Draws a square. |
Conditionals
|
Executes the Example:
|
|
Executes Example:
|
Variable Assignment
|
Assigns Example:
|
|
Retrieves the value of a variable. Example:
|
Procedures
Defining Procedures
Use
|
Calling Procedures
Call a procedure by simply typing its name followed by any required arguments.
|
Example Procedure with Parameters
|
Math and Logic
Arithmetic Operators
|
Addition |
|
Subtraction |
|
Multiplication |
``` |
Division |
|
Modulo (remainder) |
Comparison Operators
|
Greater than |
|
Less than |
|
Equal to |
Random Numbers
|
Generates a random integer between 0 and Example:
|