0% found this document useful (0 votes)
133 views4 pages

Logo Output Displayed

The document describes a command in MSWLogo that creates a repeated square pattern. The command uses the procedures setpc and repeat to draw a series of squares of increasing sizes from 50-175 units by turning 90 degrees between each side. It draws 18 squares total in increasing sizes arranged in a grid pattern on the screen.

Uploaded by

mazni08
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views4 pages

Logo Output Displayed

The document describes a command in MSWLogo that creates a repeated square pattern. The command uses the procedures setpc and repeat to draw a series of squares of increasing sizes from 50-175 units by turning 90 degrees between each side. It draws 18 squares total in increasing sizes arranged in a grid pattern on the screen.

Uploaded by

mazni08
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

The output displayed on the MSWLogo Screen that we have created the command of repeated square.

The procedures of the commands are as follows:-

to sq setpc 2

setsc [0 0 0] repeat 4 [fd 60 rt 90]

repeat 4 [fd 50 rt 90] pu

pu rt 10

rt 10 pd

pd

setpc 3

setpc 1 repeat 4 [fd 65 rt 90]

repeat 4 [fd 55 rt 90] pu

pu rt 10

rt 10 pd

pd
setpc 4 setpc 9

repeat 4 [fd 70 rt 90] repeat 4 [fd 90 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 5 setpc 1

repeat 4 [fd 75 rt 90] repeat 4 [fd 95 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 6 setpc 2

repeat 4 [fd 80 rt 90] repeat 4 [fd 100 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 8 setpc 3

repeat 4 [fd 85 rt 90] repeat 4 [fd 105 rt 90]

pu pu

rt 10 rt 10

pd pd
setpc 4 setpc 9

repeat 4 [fd 110 rt 90] repeat 4 [fd 130 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 5 setpc 1

repeat 4 [fd 115 rt 90] repeat 4 [fd 135 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 6 setpc 2

repeat 4 [fd 120 rt 90] repeat 4 [fd 140 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 8 setpc 3

repeat 4 [fd 125 rt 90] repeat 4 [fd 145 rt 90]

pu

rt 10 pu

pd rt 10

pd
setpc 4 setpc 8

repeat 4 [fd 150 rt 90] repeat 4 [fd 165 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 5 setpc 9

repeat 4 [fd 155 rt 90] repeat 4 [fd 170 rt 90]

pu pu

rt 10 rt 10

pd pd

setpc 6 setpc 1

repeat 4 [fd 160 rt 90] repeat 4 [fd 175 rt 90]

pu

rt 10 end

pd

You might also like