8
MSW LOGO BY AWIN 9S

MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

Embed Size (px)

Citation preview

Page 1: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

MSWLOGOBY AWIN 9S

Page 2: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

WHAT IS MSW LOGO?

MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is one of the easiest programming language, it’s very easy to learn. Logo has been used in telecommunications, multimedia, and robotics, etc.

Page 3: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

WHAT IT LOOKS LIKE

The turtle

Command Box

Turtle drawingarea

Command InputWindow

Page 4: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

WHAT IS THE TURTLE?

The turtle is drawn as a triangle in MSW LOGO. When we execute commands, the turtle will do what we type.

Page 5: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

BASIC COMMANDS

There’re few commands in MSW Logo.

PU - Short for "pen up," it lifts the "pen" from the screen so that moving the turtle doesn't draw a line.

PD - Puts the pen down so that moving the turtle draws a line.

FD [length]– Forward/Use to move the turtle forward

BK [length] – Backward/Move the turtle backward

LT [degree] – Turn left

RT [degree] – Turn right

Page 6: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

PROCEDURE & SUBROUTINE

Procedure/Subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code.

In MSW Logo, procedure is the steps for the turtle to do something.

Example:

Now, you can just simply type ‘square’ and it will automatically make a square

Page 7: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

VARIABLES

Variables are data which can change.

For example: Variables can be used to define the length of the square.

Declare the variable

The length will be the user’s input

e.g. square 100

Page 8: MSW LOGO BY AWIN 9S. WHAT IS MSW LOGO? MSW (Microsoft Windows) Logo is a programming language developed at the MIT Artificial Intelligence Lab. Logo is

EXAMPLE: T CIRCLE

repeat 8 [fd 50 lt 90 fd 20 rt 90 fd 20 rt 90 fd 60rt 90 fd 20 rt 90 fd 20 lt 90 fd 50 rt 90 fd 20 lt 10]

Code