SlideShare a Scribd company logo
Logo
i
AbouttheTutorial
Logo is a programming language that is easy to learn. It is used for teaching students and
children how to program a computer. It was developed to process a list of words. A
command is an instruction, which the computer can understand and execute. In principle,
the computer only understands very basic commands, which can then be combined to
form more complicated instructions. Such a sequence of commands is called a computer
program.
Writing computer programs is not easy. There are programs which has millions of
commands. To keep track of such a complicated program, it is very important to approach
the task of writing a program in a structured and well-thought-out manner. This is what
we will learn in this Logo programming course.
Audience
This tutorial is designed for those readers, who seek to understand the basic concepts of
writing programs in Logo programming language and how its different commands function.
Prerequisites
There are no prerequisites for this tutorial, except for a wish to learn how a computer
program works. Having basic computer operating knowledge will be an added advantage
in understanding this tutorial.
CopyrightandDisclaimer
 Copyright 2017 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com
Logo
ii
TableofContents
About the Tutorial ............................................................................................................................................i
Audience...........................................................................................................................................................i
Prerequisites.....................................................................................................................................................i
Copyright and Disclaimer .................................................................................................................................i
Table of Contents ............................................................................................................................................ ii
1. Logo – Introduction...................................................................................................................................1
2. Logo – Turtle.............................................................................................................................................3
Turtle Commands ............................................................................................................................................4
3. Logo – Controlling the Turtle & Pen ..........................................................................................................8
4. Logo – Turtle World ................................................................................................................................10
5. Logo – Variables......................................................................................................................................17
6. Logo – Arithmetic Operations .................................................................................................................19
7. Logo – Repetition....................................................................................................................................21
8. Logo – Randomization.............................................................................................................................23
9. Logo – Procedures...................................................................................................................................25
10. Logo – Recursive Procedures...................................................................................................................29
11. Logo – Decision-Making ..........................................................................................................................30
12. Logo – Strings..........................................................................................................................................33
13. Logo – Color............................................................................................................................................34
Logo
3
Logo is a programming language that is very simple and easy to learn. It is used for teaching
students and children how to program a computer.
Why should we learn the Logo language?
 Because it is fun, lots of fun.
 Enhances the logical sense of the children.
 Develops programming skills.
 It is real Computer Science.
Logo is a very easy and interesting programming language to learn. It has enough depth to
virtually do anything, which can be done in any other computer programming language.
How to download and install MSW Logo Software?
If Logo Programming Software is not installed on the computer, we can get it for free from
the following link:
www.softronix.com/mswlogo.html
After installation, it puts a Logo icon on the desktop of your computer.
The MSW Logo screen has two parts:
 A Drawing window above with a triangle-shaped TURTLE in the center.
1. LOGO – INTRODUCTION
Logo
4
 A Commander window as shown in the following screenshot.
We will write commands in the command line, i.e., the text box at the bottom of the
Commander Window. To execute or run these commands, press Enter or click the Execute
Button. We can also write and run more than one command online at a time.
The command history will appear in the gray box. Click a line in the history to make it jump
to the respective command line, then we can make changes (if required). Once this is done,
press Enter or click the Execute Button.
Logo
5
The simple Logo Drawing Commands move the Turtle forward and backward and also turn it
right or left. The commands and their abbreviations are given below:
 fd – forward
 bk – backward
 rt – right
 lt – left
 cs – clearscreen
Either version of these commands can be used. Except the cs command, each of these
commands must be followed by one value called as its argument. The arguments for fd and
bk are units; those of rt and lt are angles that can be any integer. A rotation by 360 is a
complete rotation, therefore a rotation by 375 degrees is the same as 1/15 degrees.
 forward 60 or fd 60 means go forward 60 steps
 right 90 or rt 90 means right turn 90 degrees
 left 90 or lt 90 means left turn 90 degrees
 back 60 or bk 60 means go back 60 steps
 clearscreen or cs means erase all drawings. This sets the turtle at the center
The graphics window has a coordinate system. The values of the two coordinates (normally
called x and y) at the center are 0, 0. At the northeast corner, they are 250, 250; at the
southeast corner, they are 250, -250. At the southwest corner, they are -250, -250; etc. If
the turtle tries to walk off onto one side of the screen, it wraps around. The right side wraps
to the left side and the top wraps to the bottom.
Many programming systems work on the same kind of two-axis ‘xy’ coordinate plane, which
we work with in Algebra as well.
2. LOGO – TURTLE
Logo
6
Here, ‘0 0’ is the center, or origin (no comma or parentheses here!). In its centered,
zoom-"normal" state, Logo's drawing screen shows an area of about 150 points up or down
and 300 points right or left from the center.
The turtle can be directed with headings that correspond to a compass rose, with 0 or 360
degrees pointing straight up, 90 degrees straight to the right, and so on. You can set a variable
to a number between 0 and 360 and then walk on that path.
TurtleCommands
Now let us try some commands. Commands will be issued one per line followed by a carriage
return. Several of these commands can be typed in succession in a command window followed
by a carriage return. The effect on the turtle is the same. However, if you type a command,
which requires one or more inputs and provide the missing input(s) on the next line, Logo will
show an error.
Following is a practice command, which shows the desired results on the right.
Logo
7
The commands – fd 50 rt 120 fd 50 rt 120 fd 50 rt 120, cause the turtle to draw a triangle,
as you can see by trying them out.
These commands are read from the left to the right. Since the command fd requires one
argument, it is taken as the next value. Similarly, rt takes an argument as well. Thus, Logo
can give an unambiguous meaning to each of these character strings. For some Logo
commands, separators are needed.
Logo
8
Following are few practice commands with the desired results on the right.
Logo
9
Following is an exercise to check your aptitude on what you have learned so far in this chapter.
Logo
10
Logo
11
End of ebook preview
If you liked what you saw…
Buy it from our store @ https://store.tutorialspoint.com

More Related Content

Similar to Logo tutorial

Creating a logo program
Creating a logo programCreating a logo program
Creating a logo program
ayaabdullahs
 
ProgFund_Lecture_7_Intro_C_Sequence.pdf
ProgFund_Lecture_7_Intro_C_Sequence.pdfProgFund_Lecture_7_Intro_C_Sequence.pdf
ProgFund_Lecture_7_Intro_C_Sequence.pdf
lailoesakhan
 
cofaso User Guide
cofaso User Guidecofaso User Guide
cofaso User Guide
VitorCordova
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
CESAR A. RUIZ C
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
Cherimay Batallones
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
lotlot
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16
Celine George
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
Sławomir Zborowski
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
Snehlata Parashar
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
Sara Samol
 
Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)
Leila Morteza
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
RabiyaZhexembayeva
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Mohammed Saleh
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Mohammed Saleh
 
ID E's features
ID E's featuresID E's features
ID E's features
wajahat Gul
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
Franciny Salles
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
Getachew Ganfur
 
Courselab Quick start guide
Courselab Quick start guideCourselab Quick start guide
Courselab Quick start guide
Bob Price
 
Roamer World
Roamer WorldRoamer World
Roamer World
Malcolm Wilson
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
An I
 

Similar to Logo tutorial (20)

Creating a logo program
Creating a logo programCreating a logo program
Creating a logo program
 
ProgFund_Lecture_7_Intro_C_Sequence.pdf
ProgFund_Lecture_7_Intro_C_Sequence.pdfProgFund_Lecture_7_Intro_C_Sequence.pdf
ProgFund_Lecture_7_Intro_C_Sequence.pdf
 
cofaso User Guide
cofaso User Guidecofaso User Guide
cofaso User Guide
 
C plus plus for hackers it security
C plus plus for hackers it securityC plus plus for hackers it security
C plus plus for hackers it security
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
Introducing Small Basic.pdf
Introducing Small Basic.pdfIntroducing Small Basic.pdf
Introducing Small Basic.pdf
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 
Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)
 
ForLoops.pptx
ForLoops.pptxForLoops.pptx
ForLoops.pptx
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
ID E's features
ID E's featuresID E's features
ID E's features
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
Courselab Quick start guide
Courselab Quick start guideCourselab Quick start guide
Courselab Quick start guide
 
Roamer World
Roamer WorldRoamer World
Roamer World
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basic
 

More from HarikaReddy115

Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorial
HarikaReddy115
 
Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
HarikaReddy115
 
Wireless communication tutorial
Wireless communication tutorialWireless communication tutorial
Wireless communication tutorial
HarikaReddy115
 
Cryptography tutorial
Cryptography tutorialCryptography tutorial
Cryptography tutorial
HarikaReddy115
 
Cosmology tutorial
Cosmology tutorialCosmology tutorial
Cosmology tutorial
HarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
HarikaReddy115
 
Biometrics tutorial
Biometrics tutorialBiometrics tutorial
Biometrics tutorial
HarikaReddy115
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
HarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
HarikaReddy115
 
Auditing tutorial
Auditing tutorialAuditing tutorial
Auditing tutorial
HarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
HarikaReddy115
 

More from HarikaReddy115 (20)

Dbms tutorial
Dbms tutorialDbms tutorial
Dbms tutorial
 
Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorial
 
Wireless communication tutorial
Wireless communication tutorialWireless communication tutorial
Wireless communication tutorial
 
Cryptography tutorial
Cryptography tutorialCryptography tutorial
Cryptography tutorial
 
Cosmology tutorial
Cosmology tutorialCosmology tutorial
Cosmology tutorial
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorial
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorial
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorial
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorial
 
Biometrics tutorial
Biometrics tutorialBiometrics tutorial
Biometrics tutorial
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorial
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorial
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorial
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorial
 
Auditing tutorial
Auditing tutorialAuditing tutorial
Auditing tutorial
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorial
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorial
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorial
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorial
 

Recently uploaded

Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 

Logo tutorial

  • 1.
  • 2. Logo i AbouttheTutorial Logo is a programming language that is easy to learn. It is used for teaching students and children how to program a computer. It was developed to process a list of words. A command is an instruction, which the computer can understand and execute. In principle, the computer only understands very basic commands, which can then be combined to form more complicated instructions. Such a sequence of commands is called a computer program. Writing computer programs is not easy. There are programs which has millions of commands. To keep track of such a complicated program, it is very important to approach the task of writing a program in a structured and well-thought-out manner. This is what we will learn in this Logo programming course. Audience This tutorial is designed for those readers, who seek to understand the basic concepts of writing programs in Logo programming language and how its different commands function. Prerequisites There are no prerequisites for this tutorial, except for a wish to learn how a computer program works. Having basic computer operating knowledge will be an added advantage in understanding this tutorial. CopyrightandDisclaimer  Copyright 2017 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at contact@tutorialspoint.com
  • 3. Logo ii TableofContents About the Tutorial ............................................................................................................................................i Audience...........................................................................................................................................................i Prerequisites.....................................................................................................................................................i Copyright and Disclaimer .................................................................................................................................i Table of Contents ............................................................................................................................................ ii 1. Logo – Introduction...................................................................................................................................1 2. Logo – Turtle.............................................................................................................................................3 Turtle Commands ............................................................................................................................................4 3. Logo – Controlling the Turtle & Pen ..........................................................................................................8 4. Logo – Turtle World ................................................................................................................................10 5. Logo – Variables......................................................................................................................................17 6. Logo – Arithmetic Operations .................................................................................................................19 7. Logo – Repetition....................................................................................................................................21 8. Logo – Randomization.............................................................................................................................23 9. Logo – Procedures...................................................................................................................................25 10. Logo – Recursive Procedures...................................................................................................................29 11. Logo – Decision-Making ..........................................................................................................................30 12. Logo – Strings..........................................................................................................................................33 13. Logo – Color............................................................................................................................................34
  • 4. Logo 3 Logo is a programming language that is very simple and easy to learn. It is used for teaching students and children how to program a computer. Why should we learn the Logo language?  Because it is fun, lots of fun.  Enhances the logical sense of the children.  Develops programming skills.  It is real Computer Science. Logo is a very easy and interesting programming language to learn. It has enough depth to virtually do anything, which can be done in any other computer programming language. How to download and install MSW Logo Software? If Logo Programming Software is not installed on the computer, we can get it for free from the following link: www.softronix.com/mswlogo.html After installation, it puts a Logo icon on the desktop of your computer. The MSW Logo screen has two parts:  A Drawing window above with a triangle-shaped TURTLE in the center. 1. LOGO – INTRODUCTION
  • 5. Logo 4  A Commander window as shown in the following screenshot. We will write commands in the command line, i.e., the text box at the bottom of the Commander Window. To execute or run these commands, press Enter or click the Execute Button. We can also write and run more than one command online at a time. The command history will appear in the gray box. Click a line in the history to make it jump to the respective command line, then we can make changes (if required). Once this is done, press Enter or click the Execute Button.
  • 6. Logo 5 The simple Logo Drawing Commands move the Turtle forward and backward and also turn it right or left. The commands and their abbreviations are given below:  fd – forward  bk – backward  rt – right  lt – left  cs – clearscreen Either version of these commands can be used. Except the cs command, each of these commands must be followed by one value called as its argument. The arguments for fd and bk are units; those of rt and lt are angles that can be any integer. A rotation by 360 is a complete rotation, therefore a rotation by 375 degrees is the same as 1/15 degrees.  forward 60 or fd 60 means go forward 60 steps  right 90 or rt 90 means right turn 90 degrees  left 90 or lt 90 means left turn 90 degrees  back 60 or bk 60 means go back 60 steps  clearscreen or cs means erase all drawings. This sets the turtle at the center The graphics window has a coordinate system. The values of the two coordinates (normally called x and y) at the center are 0, 0. At the northeast corner, they are 250, 250; at the southeast corner, they are 250, -250. At the southwest corner, they are -250, -250; etc. If the turtle tries to walk off onto one side of the screen, it wraps around. The right side wraps to the left side and the top wraps to the bottom. Many programming systems work on the same kind of two-axis ‘xy’ coordinate plane, which we work with in Algebra as well. 2. LOGO – TURTLE
  • 7. Logo 6 Here, ‘0 0’ is the center, or origin (no comma or parentheses here!). In its centered, zoom-"normal" state, Logo's drawing screen shows an area of about 150 points up or down and 300 points right or left from the center. The turtle can be directed with headings that correspond to a compass rose, with 0 or 360 degrees pointing straight up, 90 degrees straight to the right, and so on. You can set a variable to a number between 0 and 360 and then walk on that path. TurtleCommands Now let us try some commands. Commands will be issued one per line followed by a carriage return. Several of these commands can be typed in succession in a command window followed by a carriage return. The effect on the turtle is the same. However, if you type a command, which requires one or more inputs and provide the missing input(s) on the next line, Logo will show an error. Following is a practice command, which shows the desired results on the right.
  • 8. Logo 7 The commands – fd 50 rt 120 fd 50 rt 120 fd 50 rt 120, cause the turtle to draw a triangle, as you can see by trying them out. These commands are read from the left to the right. Since the command fd requires one argument, it is taken as the next value. Similarly, rt takes an argument as well. Thus, Logo can give an unambiguous meaning to each of these character strings. For some Logo commands, separators are needed.
  • 9. Logo 8 Following are few practice commands with the desired results on the right.
  • 10. Logo 9 Following is an exercise to check your aptitude on what you have learned so far in this chapter.
  • 12. Logo 11 End of ebook preview If you liked what you saw… Buy it from our store @ https://store.tutorialspoint.com