Logo is an educational programming language, designed in 1967 by Wally Feurzeig, Seymour Papert, and Cynthia Solomon. Logo is not an acronym: the name was coined by Feurzeig while he was at Bolt, Beranek and Newman, and derives from the Greek logos, meaning word or thought. A general-purpose language, Logo is widely known for its use of turtle graphics, in which commands for movement. Creating graphic in MSW Logo Program with Editor.
- Programming With Msw Logo Using The Editor Free
- Programming With Msw Logo Using The Editor Software
- Programming With Msw Logousing The Editor
- Programming With Msw Logo Using The Editor Pdf
Rose Bay High School
In most applications, the 'turtle' is reduced to an object in the centre of the screen, sometimes in the shape of a turtle, more often, simply a triangle.
The user enters English-like commands such as FORWARD, REVERSE, PENDOWN, PENUP, RIGHT, LEFT and so on. If the turtle's 'pen' is 'down', it draws on the screen as it moves!
Entering MSW Logo Commands
Commands are entered in the Input Box in the Commander window at the bottom of the screen.
Commands are executed, after being entered in the Input Box, by either pressing the Return key, or clicking on the Execute button. Each command is recorded in the Output/Command-Recall List Box above the Input Box.
The turtle looks like a little triangle in the middle of the screen. The head shows you which direction he is facing. When the turtle moves he draws a line behind him.
You can turn the turtle by telling him to turn RIGHT or LEFT. This picture shows how to make the turtle turn in different directions. Instead of typing out RIGHT and LEFT I use the smaller words RT and LT, which mean the same thing to the turtle.
To get the turtle to draw a line, just tell him to move FORWARD a number of steps (turtles take small steps, so you need to tell him to move FORWARD many steps, like 100, to get him to move enough to see). I like to use the smaller word FD instead of typing FORWARD. Both work the same way.
To get the turtle to draw a shape, like a square, you can give him the instructions he needs to 'walk' around the shape of a square.
A Typical Logo ProgramScreen Dimensions
To exit MSW Logo enter BYE in the Input Box, or select Exit from the File menu.
1.Open MSWlogo on your computer.
·Go to the START button.
·Go to PROGRAMS.
·Go to MICROSOFT WINDOWS LOGO.
·Click on MSWlogo.
2.Click on Help then click on Demo to run the demonstration.
3.Click on Help then click on Tutorial and run the tutorial.
4.Click on the Input Box and enter the typical logo program above.
5.Clear the screen using the command CS and explore with different commands.
(The commands are shown on the next page)
Summary of Selected MSW Logo Commands
Turtle moves forward the specified number of units.
Turtle moves back the specified number of units.
Turtle turns clockwise the number of degrees specified.
Turtle turns counterclockwise the angle specified.
Turtle's pen is up. (Doesn't draw as it moves.)
Turtle's pen is in the down position.
Turtle erases as it moves.
Removes the Turtle 'triangle' from the screen.
Makes the Turtle visible again.
Erases the screen and returns the Turtle to its 'home' position in the centre of the drawing screen.
Returns the Turtle to the 'home' position without erasing the screen. (Issue a PU command before HOME to prevent it drawing its return path as it goes.)
LABEL [HELLO WORLD]
Displays text at the Turtle location.
SETPENCOLOR SETPC followed by a number from 0 to 15.
Determines pen color according to:
SETPC 4 = Red
SETPC 2 = Green
SETPC 1 = Blue
SOUND [<frequency> <duration>] where “frequency” is in cps and “duration” is in 1000ths of a second.
SETPENSIZE [10 10]
Sets width and height of the drawing pen. MSW Logo uses only the second value. Set them both the same.
Exits MSW Logo
Type cs to clear the screen. You will see a small turtle in the center of the screen.
The boundaries of the screen are controlled by the commands WRAP, FENCE and WINDOW.
Programming With Msw Logo Using The Editor Free
Find out the difference between these by typing:
cs wrap fd 900
cs fence fd 900
cs window fd 900
The colour of the pen is controlled by SETPENCOLOR. For example to draw in blue you would type SETPENCOLOR1 or SETPC 1. Try it!
To see a description of this command, look in the help/index and search for pencolor.
Thewidth of the pen is defined by SETPENSIZE followed by two numbers in square brackets. Make sure the numbers are the same egSETPENSIZE [20 20].
This command allows you to select the screen color.You can also select the screen color with the Logo command SETSCREENCOLOR and obtain it with the Logo command
A SCREEN SAVER
Type the following into the input box and see what happens.
WRAP REPEAT 2000 [ SETPC RANDOM 16 SETPENSIZE[20 20] FD RANDOM 100 RT RANDOM 360 ]
Drawing Shapes and Importing Pictures
1. Open MSW Logo.
2. Click in the Input Box.
3. Type in the following:
FD 100<Press Enter>
RT 90<Press Enter>
FD 100<Press Enter>
RT 90<Press Enter>
FD 100<Press Enter>
RT 90<Press Enter>
FD 100<Press Enter>
NOTE: The '<' and '>' symbols contain instructions. Whenever they are used in these sheets, ignore them! Don't type them in!
4. Type in the following:
repeat 4 [fd 100rt90]<Press Enter>
5. Type in the following:
to square<Press Enter>
repeat 4 [fd100rt90]<Press Enter>
The method used in steps 5 and 6 is called writing a 'procedure'. All Logo procedures begin with 'to' and end with 'end'.If you define a procedure via the Input Box by typing in: to box, the input dialogue window appears where you enter one line at a time followed by <Enter>. You are prompted to type in “End” to end the procedure.
A better approach for editing is to use the built-in Editor window…
1. Go to the File/Edit… menu
2. Type in a suitable procedure name (Box) and click the OK button. The Editor window appears…
3.Type the following instructions
repeat 2 [fd 100 rt 90 fd 300 rt 90]
You can type in commands, edit them, cut and paste, just like a conventional word processor.
4.When you have finished defining the procedure go to File/Exit and click the Yes button to save your work.
Remember that nothing has been saved to disk until you do a File/Save.
Saving Your Work in MSW Logo:
The File/Save and File/Save As… menus can be used to save logo files in the usual way, BUT this will only save work that has been defined as procedures. MSW Logo will save ALL of the procedures you defined during the ‘session’ as a file with the extension .LGO. The programme does NOT save individual procedures as separate files. All the procedures you created will be saved. You will lose all of the commands typed directly into the Input Box that were not defined as part of a procedure. (Another great reason for using procedures!)
1.Write the procedure below in MSWlogo’s editor.
REPEAT 100 [FD 10 RT REPCOUNT]
2.Save your work to your user directory.
·Click on File/Save as
·Find your user directory on U: drive.
Loading Previously Saved Sessions:
The File/Load menu allows you to reload procedures you have previously defined. Only those files with a “.LGO” extension will listed in the dialogue box. If you want to load a file created with a text editor and saved without the .LGO extension select All Files (*.*) from the Files of Type: box.
WARNING: Loading a file will overwrite any procedures from the current session of the same name. ie If you have just defined a procedure called MyPicture and the file you load also has a procedure called MyPicture, the current one will be overwritten by the one contained in the file and you will lose all of the commands defined within the current version.
3.Load the work you saved in Activity 8.
·Click on File/Load.
·Find your user directory and click on the filed you saved.
·Run the procedure wow
******To Print Your Work Click On BITMAP/PRINT******
1. Construct a procedure to draw an equilateral (equal-sided) triangle of side-length 100 units.
2. Construct a shape consisting of three equilateral triangles and a square.
3. Save your work onto your user directory called <**EXER6>
NOTE: Put in your initials instead of the asterisks!! eg <FBEXER6>
4. Use the 'Label' function to add a title at the top of your screen.
eg label[This is my Drawing]
1.Use the process described below to place a picture on your screen.
2.Open a drawing package and create a drawing.
·Go to START/PROGRAMS/ACCESSORIES/PAINT
3.Save the image to your user directory in .BMP format
4.Go to the Bitmap menu in MSWlogo and select Load
5.Locate the bitmap image in your user directory and load it into MSW Logo
·To see the image you may have to minimize the Commander Window.
6.Close MSW Logo
Create a scene (such as a golf course) and use the direction commands in MSW Logo to ‘play’ your way around the course.
Have a competition with someone else in your class to see who can complete the course in the lowest number of ‘stokes’.
Procedures within Procedures:
Drawing a house …
1.Type the following into the editor in MSWlogo. (Remember you can use cut and paste from the Intranet version of this document).
Programming With Msw Logo Using The Editor Software
2. Now draw the house by typing house in the INPUT BOX. Write your own procedures to add to the drawing.
Cut and paste each of the following into the editor and run the procedure.
repeat 3[fd 100 lt 120]
repeat 4[fd 100 rt 90]
repeat 36[fd 10 lt 360/36]
repeat 10[fd 50 lt 360/10]
repeat 25[circle1 triangle lt 90]
repeat 50[square rt 10]
repeat 60[triangle rt 10]
- Logo Tutorial
- Logo Useful Resources
- Selected Reading
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.
Programming With Msw Logousing The Editor
How to download and install MSW Logo Software?
Programming With Msw Logo Using The Editor Pdf
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.
- 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.