Table of Contents
All the Logo commands below will help students easily perform operations when using this programming software.
All the Logo commands below will help students easily perform operations when using this programming software. By mastering Logo commands, students will be able to perform tasks such as returning the turtle to its starting position or moving the turtle backward 100 steps faster. This article summarizes all the basic Logo commands.
Some FAQ
In Logo software, which command do I use to make the turtle return to its starting position?HOME
When executing the command, pdthe turtle will: Show itself , the command puwill hide itself .
In Logo software, which command do I use to make the turtle move backward 100 steps?bk 100
To clear the screen and make the turtle return to its starting position, I use the command: HOME
Logo Movement Commands
| Command | Acronym | Function |
| Forward x | FD x | Move forward x steps |
| Back x | BK x | Step back x steps |
| Left x | LT x | Turn the turtle to the left at x degrees. |
| Right x | RT x | Turn the turtle to the right at x degrees. |
| ARC ar | Create a circle with angle 'a' and radius 'r'. After creating it, the turtle should stand still in place. | |
| ARC2 ar | Create a circle with angle a and radius r. The turtle will follow along as you create it. | |
| ELLIPSE xy | Create an ellipse with two parameters: width along the x-axis and height along the y-axis, with the turtle remaining stationary. | |
| ELLIPSE2 xy | Create an ellipse with two parameters: width along the x-axis and height along the y-axis. The turtle will follow the ellipse. | |
| ELLIPSEARC |
The length of the xyz arc (z is degrees) For example, if you want to draw a half-ellipse in front of the turtle (90), the command is as follows: ELLIPSEARC 180 150 80 90. You can change the number 90 to understand how to do it. If you want the turtle to run while drawing, use ELLIPSEARC2. |
|
| CIRCLE r | Draw a circle with radius r, with the turtle standing at the center. | |
| CIRCLE2 r | Draw a circle with radius r. The turtle moves along the circle; after completion, the turtle lies on the circle. |
The Group of Commands to Print the Results/message
| Command | Acronym | Function |
| SHOW [content of the results you want to print] | Similar PR order | |
| LABEL | Results appear | |
| Cleartext | CT | Clear the command window |
Graphics and Color Command Group
| Command | Acronym | Function |
| Penup | PU | The turtle was moved without leaving a trace. |
| Pendown | PD | The movement commands that follow this one will show traces of the movement. |
| NCO | Delete mode | |
| SetPenSize n | Set the thickness of the pen stroke (n is the thickness of the pen stroke). This command can be executed via Menu Set ? Pen Size... | |
| SetPC [RBG] | Set the color for the brush. Values range from 0-255. | |
| Setfloodcolor [RGB] | SETFC[RGB] | Set the background color using Fill. |
| FILL | Color the background |
The Command Group Controls the Turtle and Its Position
| Command | Acronym | Function |
| Hideturtle | HT | Hide the turtle |
| Showturtle | ST | The turtle |
| SETPOS xy | Move the turtle to position X,Y | |
| SETX x | Move the turtle sideways x > 0 to the right, x | |
| SETY y | Move the turtle up if y>0, down if y<0 | |
| Xcor | View the turtle's x-coordinate. | |
| Yor | View the turtle's y-coordinate. | |
| POS | View current location | |
| CS | Delete and reposition | |
| Clean | Erase the drawing, keeping the turtle in its original position. | |
| HOME | The turtle returns to its original position. | |
| HEADING | Turtle rotation | |
| SetHeading | Spinning the turtle | |
| TOWARDS xy | Turn the turtle's head towards the x and y coordinates. | |
| DISTANCE xy | Distance from current position to coordinate xy |
Instructions for Programming Using MSWLogo
Step 1: Move the Turtle
The turtle's position will be displayed in the center. In the command input box, type Forward 50 and then click the Execute button to execute the command, or press Enter.
The turtle will immediately move 50 steps in a straight line. The abbreviation FD 50 can be entered.
If you want to move the turtle in a straight line to the right, enter the command RT 90 FD 50. The turtle will then rotate 90 degrees to the right and move forward 50 steps.
If you want to rotate the turtle to the left, enter the command LT 90 .
To type the reverse command, press BK 50 or Back .
If you want to clear all content displayed on the screen, type `clearscreen` or `CS` and move the turtle to the top.
To delete commands, press Cleartext or CT .

Step 2: Create a Process for MSWLogo
The process in MSWLogo is a series of steps where the turtle will draw according to commands or the content you need to create.
To create a process for drawing a square, click on File , then type Square and press Enter. Click after the word Square and press Enter. Continue by typing the command FD 50 RT 90 four times . Then, click File, save and exit .
In the command line window, type the process Square > Execute . The turtle will then draw a square with dimensions of 50 x 50 x 50 x 50.
You continue by clicking Edall in the command line window and go to the process square you just created, then delete the command FD 50 RT 90 .
Repeat the above steps once more, but type a shorter command: [Repeat 4 FD 50 RT 90].
Click on File, save, and exit . Move to the command line window, type Square again, and press Enter. The turtle will draw a square on the screen.
Once you know how to draw a square, you can easily create other shapes. For example, to draw a triangle, enter the command Repeat 4 FD 50 RT 120 .

Step 3: Setxy Coordinates
To move the turtle to different positions, type in the coordinates; the x-coordinate moves the turtle left and right, and the y-coordinate moves the turtle up and down.
For example, type the command Setxy 100 100 and press Enter to move the turtle 100 degrees left and right, and 100 degrees up and down.

Step 4: Penup and Pendown
Penup PU FD 50
Pendown PD .


File > EditBox windowcreate "main "mywindow "Autodraw 0 0 50 50 [] .
Box
Edall > Enter sau (windowcreate "main "mywindow "Autodraw 0 0 50 50 []) .
Reset buttoncreate "mywindow "mybutton "Square 10 20 30 10 [square] .
Box
buttoncreate "mywindow "mybutton2 "Close 10 10 25 10 [windowdelete "mywindow]
windowdelete 'mywindow"

Reader Comments 0
Sign in with email or Google to join the discussion.