MSW LOGO COMMANDS
Command Description Example
FD Moves turtle forward FD 100
BK Moves turtle backward BK 100
Right or RT Turns the head of the turtle to the right RT 90
Left or LT Turns the head of the turtle to the left LT 90
Home Brings the turtle to its starting position Home
CS or CLEARSCREEN Erases drawing on the main screen CS
CT or CLEARTEXT Erases the text from the commander
window
CT
LABEL Write text or number on the main
screen
Label 100
Label[Logo Commands]
Label “Logo Commands”
PRINT or PR Write text or number in the Recall
Text Box
PR 100
PR[Logo Commands]
PR “Logo Commands”
SETPENSIZE Sets the size of the turtle’s pen SETPENSIZE[5 5]
SETPETCOLOR OR
SETPC
Sets the color of the turtle’s pen SETPC[255 0 0]
PU or PENUP Turtle moves without drawing lines. PU
PD or PENDOWN Turtle moves while drawing lines PD
PE or PENERASE Sets pen in erase in mode. PE
PENNORMAL Sets the pen to normal drawing mode. PENNORMAL
HT or HIDETURTLE Used to hide the turtle once the
drawing is complete
HT
ST or SHOWTURTLW It makes the turtle visible on the
screen again.
ST
SETFC or
SETFLOODCOLOR
Sets the value of the fill color. SETFC[255 100 200]
FILL Fills the enclosed area with the
specified color
FILL
Loops in MSW Logo
Repeat Command is used to repeat a set of commands the specified number of times.
Triangle 3 (sides)
Repeat 3 [FD 100 RT 120]
Square (4 sides)
Repeat 4 [FD 100 RT 90]
Pentagon (5 sides)
Repeat 5 [FD 100 RT 72]
Hexagon (6 sides)
Repeat 6 [FD 100 RT 60]
Septagon(7 sides)
Repeat 7 [FD 100 RT 51]
Octagon (8 sides)
Repeat 8 [FD 100 RT 45]
Repeat inside Repeat Command
One Repeat command can be used inside another repeat command. Some examples are given
below:
REPEAT 36[REPEAT 4[FD 100 RT 90] RT 10] REPEAT 8 [ REPEAT 5 [ RT 72 FD 70 ] RT
45 ]
REPEAT 50 [ELLIPSE 100 30 RT 5] REPEAT 8 [RT 45 REPEAT 6 [REPEAT 90
[FD 2 RT 2] RT 90]]
Operators and Operator Commands
Operators Description Examples
+ Addition Pr 3+4
label 1+6+7
- Subtraction label 8-6-7
* Multiplication Pr 8*9
/ Division Pr 6/2
Operator Commands
Commands Description Examples
SUM Finds the sum of two or more
numbers
PR SUM 30 40
PR (SUM 25 35 45 600
DIFFERENCE Finds the difference between
two numbers
PR DIFFERENCE 65 45
PRODUCT Finds the product of two or
more numbers
PR PRODUCT 5 10
PR (PRODUCT 5 25 35)
QUOTIENT Finds the quotient when one
number is divided by another.
PR QUOTIENT 8 2
REMAINDER Finds the remainder when one
number is divided by another.
PR REMAINDER 5 3
Link for Extra Practice
http://www.mathcats.com/gallery/15wordcontest.html

logo_commands.pdf

  • 1.
    MSW LOGO COMMANDS CommandDescription Example FD Moves turtle forward FD 100 BK Moves turtle backward BK 100 Right or RT Turns the head of the turtle to the right RT 90 Left or LT Turns the head of the turtle to the left LT 90 Home Brings the turtle to its starting position Home CS or CLEARSCREEN Erases drawing on the main screen CS CT or CLEARTEXT Erases the text from the commander window CT LABEL Write text or number on the main screen Label 100 Label[Logo Commands] Label “Logo Commands” PRINT or PR Write text or number in the Recall Text Box PR 100 PR[Logo Commands] PR “Logo Commands” SETPENSIZE Sets the size of the turtle’s pen SETPENSIZE[5 5] SETPETCOLOR OR SETPC Sets the color of the turtle’s pen SETPC[255 0 0] PU or PENUP Turtle moves without drawing lines. PU PD or PENDOWN Turtle moves while drawing lines PD PE or PENERASE Sets pen in erase in mode. PE PENNORMAL Sets the pen to normal drawing mode. PENNORMAL HT or HIDETURTLE Used to hide the turtle once the drawing is complete HT ST or SHOWTURTLW It makes the turtle visible on the screen again. ST SETFC or SETFLOODCOLOR Sets the value of the fill color. SETFC[255 100 200] FILL Fills the enclosed area with the specified color FILL
  • 2.
    Loops in MSWLogo Repeat Command is used to repeat a set of commands the specified number of times. Triangle 3 (sides) Repeat 3 [FD 100 RT 120] Square (4 sides) Repeat 4 [FD 100 RT 90] Pentagon (5 sides) Repeat 5 [FD 100 RT 72] Hexagon (6 sides) Repeat 6 [FD 100 RT 60] Septagon(7 sides) Repeat 7 [FD 100 RT 51] Octagon (8 sides) Repeat 8 [FD 100 RT 45] Repeat inside Repeat Command One Repeat command can be used inside another repeat command. Some examples are given below: REPEAT 36[REPEAT 4[FD 100 RT 90] RT 10] REPEAT 8 [ REPEAT 5 [ RT 72 FD 70 ] RT 45 ] REPEAT 50 [ELLIPSE 100 30 RT 5] REPEAT 8 [RT 45 REPEAT 6 [REPEAT 90 [FD 2 RT 2] RT 90]]
  • 3.
    Operators and OperatorCommands Operators Description Examples + Addition Pr 3+4 label 1+6+7 - Subtraction label 8-6-7 * Multiplication Pr 8*9 / Division Pr 6/2 Operator Commands Commands Description Examples SUM Finds the sum of two or more numbers PR SUM 30 40 PR (SUM 25 35 45 600 DIFFERENCE Finds the difference between two numbers PR DIFFERENCE 65 45 PRODUCT Finds the product of two or more numbers PR PRODUCT 5 10 PR (PRODUCT 5 25 35) QUOTIENT Finds the quotient when one number is divided by another. PR QUOTIENT 8 2 REMAINDER Finds the remainder when one number is divided by another. PR REMAINDER 5 3 Link for Extra Practice http://www.mathcats.com/gallery/15wordcontest.html