Thanks to visit codestin.com
Credit goes to www.scribd.com

67% found this document useful (3 votes)
6K views3 pages

MSW Logo Commands Guide

This document provides descriptions and examples of various commands used in MSW Logo, including commands for moving and turning the turtle, drawing shapes using repetition of commands, setting properties like pen size and color, and using basic mathematical operators and functions. Key commands allow moving the turtle forward and backward, turning left and right, erasing drawings, hiding and showing the turtle, and filling enclosed areas. Loops are used to repeat commands to draw shapes like triangles, squares, pentagons, and more complex nested shapes. Operators and functions allow performing basic math operations.

Uploaded by

sshemsu70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
6K views3 pages

MSW Logo Commands Guide

This document provides descriptions and examples of various commands used in MSW Logo, including commands for moving and turning the turtle, drawing shapes using repetition of commands, setting properties like pen size and color, and using basic mathematical operators and functions. Key commands allow moving the turtle forward and backward, turning left and right, erasing drawings, hiding and showing the turtle, and filling enclosed areas. Loops are used to repeat commands to draw shapes like triangles, squares, pentagons, and more complex nested shapes. Operators and functions allow performing basic math operations.

Uploaded by

sshemsu70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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 CT
window
LABEL Write text or number on the main Label 100
screen Label[Logo Commands]
Label “Logo Commands”
PRINT or PR Write text or number in the Recall PR 100
Text Box PR[Logo Commands]
PR “Logo Commands”
SETPENSIZE Sets the size of the turtle’s pen SETPENSIZE[5 5]
SETPETCOLOR OR Sets the color of the turtle’s pen SETPC[255 0 0]
SETPC
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 HT
drawing is complete
ST or SHOWTURTLW It makes the turtle visible on the ST
screen again.
SETFC or Sets the value of the fill color. SETFC[255 100 200]
SETFLOODCOLOR
FILL Fills the enclosed area with the FILL
specified color
Loops in MSW Logo
Repeat Command is used to repeat a set of commands the specified number of times.

Triangle 3 (sides) Square (4 sides) Pentagon (5 sides)


Repeat 3 [FD 100 RT 120] Repeat 4 [FD 100 RT 90] Repeat 5 [FD 100 RT 72]

Hexagon (6 sides) Septagon(7 sides) Octagon (8 sides)


Repeat 6 [FD 100 RT 60] Repeat 7 [FD 100 RT 51] 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 PR SUM 30 40
numbers PR (SUM 25 35 45 600
DIFFERENCE Finds the difference between PR DIFFERENCE 65 45
two numbers
PRODUCT Finds the product of two or PR PRODUCT 5 10
more numbers PR (PRODUCT 5 25 35)
QUOTIENT Finds the quotient when one PR QUOTIENT 8 2
number is divided by another.
REMAINDER Finds the remainder when one PR REMAINDER 5 3
number is divided by another.

Link for Extra Practice

http://www.mathcats.com/gallery/15wordcontest.html

You might also like