Computer Science, asked by nanjaia, 28 days ago

write the logo program for square

Answers

Answered by Ladylaurel
3

Question :-

Write a logo program for square.

Program :

The program can be written in two ways, by using Right turn and Left turn.

1. Right turn [ RT ] :-

FD 100

RT 90

FD 100

RT 90

FD 100

RT 90

FD 100

Output : Refer the attachment.

----------------------------------

2. Left turn [ LT ] :-

FD 100

LT 100

FD 100

LT 90

FD 100

LT 90

FD 100

Output : Refer the attachment.

----------------------------------

More Information

Some more information related to

"Logo program" :-

LOGO = Language Of Graphic Oriented.

In LOGO program, a small triangle () present in the centre of the screen is called "turtle".

The most common LOGO commands :-

  • FD [Forward] command = moves forward in a straight line.
  • RT [Right] command = turns right or in clockwise direction.
  • LT [Left] command = turns left or in anticlockwise direction.
  • BK [Back] command = moves backward in a straight line.

Some more LOGO commands :-

  • HOME command = brings the turtle back to the original position.
  • CS [CLEARSCEEEN] command = clears the drawing screen and the turtle moves back to home.
Attachments:
Similar questions