👤🌐 EN

← ict

Unit 6: LOGO Grade 7

Grade 7 Ict (new curriculum) p.76

UNIT
6 Logic Oriented Graphics
Oriented Programming
Unit Outcomes
At the end of this unit, students will be able to :
define Logic Oriented Graphics Oriented ( LOGO);
describe graphical elements of LOGO;
write procedures on LOGO environment.
Overview
This unit will introduce students to programming in LOGO and
describes the basic elements of LOGO environment. LOGO is a
text-based programming language where children type commands
that are then drawn on screen. This unit also introduces the basic
LOGO commands where the students use their knowledge of LOGO
commands to read and write a code.

Grade 7 Ict (new curriculum) p.77

6.1. Programming Language
Brainstorming activity
Do you know what computer languages are?
if so? Is it diffrent from human languages like english
What is programming language?
A computer programming language is an artificial language designed
to instruct a computer what to do. There are different types of computer
programming languages such as C++, python, Java, and LOGO. In
this unit, LOGO programming language is discussed.
LOGO is a programming language specifically designed for its ease of
use and graphics capabilities. It was originally designed to introduce
children to programming concepts.
LOGO’s graphics language is called turtle graphics which allows
complex graphics images to be created with a minimum of coding.
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 LOGO programming language?
Because it is lots of fun.
It enhances the logical sense of the children.
It develops programming skills.
※To write programs using LOGO
programming language, first we
need to have the software installed
in our computer. MSW Logo is the
most commonly used software to
write programs in LOGO programming
language. Figure 6.1: MS Logo software icon
Steps to Open MSW Logo
To open the MSW Logo, you can open by clicking on the icon as
shown in Figure 6.2 directly from the desktop, or you can use the
following steps:
Click on the start button.
Click on programs.
Then click on Microsoft Windows Logo.
Figure 6.2: Steps to open MSW LOGO
Once you have opened the MSW Logo application, you can run the
demonstration by clicking on Help menu and then click on Demo.

Grade 7 Ict (new curriculum) p.79

Activity 6.1
Discuss in group and write the differences between pro-
gramming language and natural language.
What is the purpose of using computer programming lan-
guage?
6.2. Graphical Elements of MSW Logo
As illustrated in Figure 6.4, the MSW Logo screen has two parts:
Main screen: is also known as the graphic screen. It is the
place to draw pictures or figures.
Commander window: is the place to give commands to the
turtle.
Figure 6.3. The two main parts of MSW Logo
The MSW Logo screen elements are shown in Figure 6.5, and the detail
descriptions of each of the screen elements are given below.
Title bar: Title bar contains the name of the program (MSW
Logo).
Menu bar: Menu bar contains various options for handling,
editing and formatting file. Menu titles contain various
sub-options which come when these menu titles are clicked
upon.
Button bar: Button bar provides additional shortcuts for
LOGO commands. To execute a button command, position
the mouse cursor on the button and press the left mouse
button.
Listener window: Listener window is the area where the
commands are typed.
Turtle: The triangle shape in the center of the graphic screen
is called turtle. The turtle moves on the screen according to
the commands you give it.
Command input box: It is where you type commands in
and execute them by clicking on the Execute button or by
pressing the Enter key on the keyboard. The command input
box is located in the bottom left portion of the command
window.
Output or command-recall list box: displays and records all
the commands that are executed and any messages which
are outputs of these commands. Output or command-recall
list box is located above the Command Input Box.

Grade 7 Ict (new curriculum) p.81

Figure 6.4: MSW Logo screen elements
6.3. Basic MSW LOGO Drawing Commands
The MSW Logo consists of four basic drawing commands:
Move the turtle forward
Move the turtle backward
Turn the turtle right
Turn the turtle left.
LOGO drawing command understands only the LOGO commands.
The center of the MSW LOGO screen is the home of the turtle. We can
use the abbreviations of the basic commands where the abbreviations
of these commands are given as fd – forward, bk – backward, rt –
right, and lt – left. Each of these commands must be followed by one
value called argument. The arguments for fd and bk are units; rt and
lt are angles that can be any integer.
For example:
forward 10 or fd 10 means go forward 10 steps;
right 90 or rt 90 means right turn 90 degrees;
left 90 or lt 90 means left turn 90 degrees;
back 10 or bk 10 means go back 10 steps.
In addition to the above four basic drawing commands, clear
screen (cs) is the other commonly used MSW Logo command that
helps to erase all drawings and set the turtle at the center.
Activity 6.2
In a group, discuss and report the four major MSW LOGO
screen elements to the class.
Write the MSW LOGO drawing commands that move the
turtle 20 steps forward, then turn 50 degrees left and move
20 steps forward. Draw the shape created by this command
on a sheet of paper.
6.4. Procedures
A procedure is a set of instructions that is given a name that describes
it. It help us to organize a large project into smaller parts that work
together to achieve a goal. The MSW Logo commands described
in section 6.3 such as FORWARD and BACK are called primitive
procedures. They are words that LOGO has already known. We can
also add new words to the language and then use them as if they were
built-in. The details on how to create a new words are usually called
procedures.
Usually it is much easier to type a one-word procedure name than to
type all of the instructions that would do the same thing. For example,
we would type SQUARE or REPEAT 4 [FORWARD 100 RIGHT
90] every time we want a square. Defining a procedure is so simple
that we will often do that before even typing out a long sequence of

Grade 7 Ict (new curriculum) p.83

commands. A procedure’s name is one word that should describe
what the procedure does so that you can easily remember what it is
for.
We have to always define the procedure before using it; otherwise
we will receive a message like “your procedure is not in LOGO ’s
vocabulary yet” as illustrated in Figure 6.6.
Figure 6.5. Message in the Listener window of MSW LOGO
6.4.1. Defining a Procedure
To write a LOGO procedure we can use either of the following options:
The TO command
The Editor windows
Steps to write a PROCEDURE using TO commands:
STEP 1 : Click in the Command Input Box
STEP 2 : Type <TO> followed by a name for the procedure, for
example: TO SQUARE
STEP 3 : Now, press the <Enter> key
STEP 4 : After pressing the <Enter> key, the To Mode Input box
appears as shown in Figure 6.7.
STEP 5 : Click inside the box
STEP 6 : Enter the commands one after the other, pressing the
<Enter> key after each command
STEP 7 : Type <END> to mark the end of the procedure
Figure 6.6: To Mode Input box
Steps to write a PROCEDURE using Editor window:
Alternately, we can write a LOGO PROCEDURE using an EDITOR
WINDOW.
STEP 1: Click in the Command Input box and type <Edit “Square”>
and press the <Enter> key. Square is the name of a new procedure.
The Editor Window appears as shown in Figure 6.8.
Figure 6.7: Editor Window of MSW Logo
STEP 2 : Insert a blank line after the line containing TO SQUARE
by pressing <Enter> key.
STEP 3 : Type the commands that you want to be included in the
procedure as shown in Figure 6.9
STEP 4 : Click on <File> in the Menu bar of the Editor window.
STEP 5 : Click on <Save and Exit> option in the Dropdown menu.

Grade 7 Ict (new curriculum) p.85

Figure 6.8: Commands in editor window on MSW LOGO
The instructions/commands you type in the commands input box
or editor window are remembered for later - not run immediately.
6.4.2. Running A Procedure
Running a procedure means executing the set of commands typed and
saved in the procedure. A defined procedure can be called any time
by simply typing the name of the procedure in the command input
box. You can run a procedure by typing the name of the procedure,
for example, SQUARE in the command input box and then pressing
the <Enter> key. For example, a SQUARE picture in Figure 6.10 is a
sample output for the procedure defined in Figure 6.9.
Figure 6.9: Sample output of a procedure defined in fig 6.9
Activity 6.3
Define a procedure and give an example of a procedure
that draws a 10 by 5 unit rectangle.
Summary
LOGO stands for Logic Oriented Graphics Oriented.
MSW LOGO screen is divided in two parts: graphics window
and listener window.
CS command clears the graphics screen.
A procedure is a set of instructions, which is given a name
that describes it.
We can write a procedure in two ways using the “Input Box”
or using the “Editor window”.
Procedures are small programs that can be called on again
and again through one word without typing them all out.
Running a procedure means executing the set of commands
typed and saved in the procedure.
The file saved in LOGO will have an extension of LOGO.

Grade 7 Ict (new curriculum) p.87

Review questions
Part I. Write TRUE if the statement is correct, and FALSE if it is
incorrect.
1. Command input box is one of the graphics elements of MSW
LOGO.
2. MSW LOGO can only be used to draw figures.
3. FD 50 command makes the turtle take a half turn.

← መጻሕፍት