Computer Science, asked by fauuan, 1 year ago

write logo commands to draw these polygon

Attachments:

Answers

Answered by Anishpandey1
21

to triangle repeat 3 [fd 50 lt 120] end

triangle

to square repeat 4 [fd 50 lt 90] end

square

to rectangle fd 60 rt 90 fd 40 end

rectanle

to octagon repeat 8 [fd 50 lt 45] end

octagon

Answered by Anonymous
4

The logo commands for drawing the given polygons as follows :

  • As the full angle is 360 degrees so external angles will be 360/n where n is number of sides.
  • So fd will be of some arbitrary length and rt or lt of 360/n. Repeat will be of n times. So the commands as follows.
  • Octagon :-  repeat 8 [fd 50 rt 45]
  • Square :-  repeat 4 [fd 50 rt 90]
  • Triangle :-  repeat 3 [fd 50 rt 120]
  • Rectangle :- fd 50 <- rt 90 <- fd 50 <- rt 90 <- fd 50 <- rt 90 <- fd 50
Similar questions