Computer Science, asked by Anonymous, 2 months ago

write a logo program to print an equilateral triangle.​

Answers

Answered by Anonymous
1

Required logo program:-

LT 90

FD 100

RT 120

FD 100

RT 120

FD 100

Explanation :-

  • LT 90 will rotate the turtle 90°, for drawing the base line of triangle.

  • FD 100 will move the turtle 100 steps.

  • RT 120 will rotate the turtle 120° from base side so as to create a 60° angle of triangle.

  • FD 100 will move the turtle 100 steps to create second side of triangle.

  • RT 120 will rotate the turtle 60° to create another angle of triangle.

  • finally FD 100 will create the last side of triangle.

Remember that :-

  • All sides should be equal in length in right angled triangle.

  • Angle must be equal to 60°

Commands used in program :-

  • FD for forward movement

  • RT for rotation to the right

  • LT for rotation to the left

Output attached...

Attachments:
Similar questions