You are on page 1of 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