write the logo program for square
Answers
Answered by
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:
![](https://hi-static.z-dn.net/files/d16/e1c15e7dad1276bf3ff10d96cc7f5a89.jpg)
![](https://hi-static.z-dn.net/files/df0/831fa35e8d1700fce2e098a91b7d5af9.jpg)
Similar questions