SlideShare a Scribd company logo
1 of 12
Download to read offline
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

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 securityCESAR A. RUIZ C
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Quick Tips in Odoo 16
Quick Tips in Odoo 16Quick Tips in Odoo 16
Quick Tips in Odoo 16Celine 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
Introducing small basicIntroducing small basic
Introducing small basicSara Samol
 
Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Lsmw (Legacy System Migration Workbench)
Lsmw (Legacy System Migration Workbench)Leila Morteza
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01Getachew Ganfur
 
Courselab Quick start guide
Courselab Quick start guideCourselab Quick start guide
Courselab Quick start guideBob Price
 
Introducing small basic
Introducing small basicIntroducing small basic
Introducing small basicAn I
 
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformGoogle Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformPamela Fox
 
Using Pseudocode Statements and Flowchart Symbols
Using Pseudocode Statements and Flowchart SymbolsUsing Pseudocode Statements and Flowchart Symbols
Using Pseudocode Statements and Flowchart SymbolsAr Kyu Dee
 

Similar to Logo tutorial (20)

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
 
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformGoogle Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
 
Using Pseudocode Statements and Flowchart Symbols
Using Pseudocode Statements and Flowchart SymbolsUsing Pseudocode Statements and Flowchart Symbols
Using Pseudocode Statements and Flowchart Symbols
 

More from HarikaReddy115

Data structures algorithms_tutorial
Data structures algorithms_tutorialData structures algorithms_tutorial
Data structures algorithms_tutorialHarikaReddy115
 
Wireless communication tutorial
Wireless communication tutorialWireless communication tutorial
Wireless communication tutorialHarikaReddy115
 
Control systems tutorial
Control systems tutorialControl systems tutorial
Control systems tutorialHarikaReddy115
 
Computer logical organization_tutorial
Computer logical organization_tutorialComputer logical organization_tutorial
Computer logical organization_tutorialHarikaReddy115
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorialHarikaReddy115
 
Compiler design tutorial
Compiler design tutorialCompiler design tutorial
Compiler design tutorialHarikaReddy115
 
Communication technologies tutorial
Communication technologies tutorialCommunication technologies tutorial
Communication technologies tutorialHarikaReddy115
 
Behavior driven development_tutorial
Behavior driven development_tutorialBehavior driven development_tutorial
Behavior driven development_tutorialHarikaReddy115
 
Basics of computers_tutorial
Basics of computers_tutorialBasics of computers_tutorial
Basics of computers_tutorialHarikaReddy115
 
Basics of computer_science_tutorial
Basics of computer_science_tutorialBasics of computer_science_tutorial
Basics of computer_science_tutorialHarikaReddy115
 
Basic electronics tutorial
Basic electronics tutorialBasic electronics tutorial
Basic electronics tutorialHarikaReddy115
 
Artificial neural network_tutorial
Artificial neural network_tutorialArtificial neural network_tutorial
Artificial neural network_tutorialHarikaReddy115
 
Artificial intelligence tutorial
Artificial intelligence tutorialArtificial intelligence tutorial
Artificial intelligence tutorialHarikaReddy115
 
Antenna theory tutorial
Antenna theory tutorialAntenna theory tutorial
Antenna theory tutorialHarikaReddy115
 
Analog communication tutorial
Analog communication tutorialAnalog communication tutorial
Analog communication tutorialHarikaReddy115
 

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

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 

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