Computer Science, asked by lakshitakandhari, 26 days ago

How to make the following shapes on turtle graphics..​

Attachments:

Answers

Answered by Anonymous
6

Assuming that the question is being asked for logo programming.

Required commons :-

RT 90

repeat 6 [ FD 30 RT 60 ]

Explanation :-

Since the length of sides and angles of the hexagon are given in the question, it is somewhat easy to write the program.

Common RT 90 will rotate the turtle 90° clockwise.

FD 30 will move the turtle forward.

RT 60 will rotate the turtle clockwise 60° measuring anti-clockwise.

Now we have to repeat the command FD 30 RT 60 six times which is somewhat absurd. To prevent typing same thing again and again, we may either use a loop which will run 6 times.

Repeat 6 [ FD 30 RT 60 ] this command is a loop to run FD 30 RT 60 six times.

We may also use a command HT to hide turtle.

Output of the program is given in the attachment . .♪

Attachments:
Similar questions