- Logo Tutorial
The following are the basic commands to programme the turtle: Basic Commands. Forward 200 makes a line 200 Back e.g. Back 100 goes back 100 Right e.g. Right 90 turtle turns right through a 90 degree angle Left e.g. Left 45 turtle turns left through a 45 degree angle PenUp. Video on Exterior angles: on Polygon: on Circle of a given radius: http://youtu.be/HbkwO. Loops in MSW Logo Repeat Command is used to repeat a set of commands the specified number of times. Triangle 3 (sides) Repeat 3 FD 100 RT 120 Square (4 sides) Repeat 4 FD 100 RT 90 Pentagon (5 sides) Repeat 5 FD 100 RT 72 Hexagon (6 sides) Repeat 6 FD 100 RT 60 Septagon(7 sides) Repeat 7 FD 100 RT 51 Octagon (8 sides). The installation process puts a Logo icon (as on the cover of this document) on your computer desktop. Here's the MSW Logo screen in two parts: drawing window above, with triangle-shaped TURTLE in center Commander window below. Feb 08, 2013 MSWLogo is an interpreter language based on Logo, with a GUI front end. Its core is the same as UCBLogo by Brian Harvey. It is free software, with source available, in Borland C.
- Logo Useful Resources
- Selected Reading
Procedures provide a way to encapsulate a collection of commands. Once a procedure has been created, it can be used just the way a built-in command is used. The “meaning” of a procedure is the meaning of its individual commands.
A procedure without arguments has the word ‘to’ (a reserved word) and the name of the procedure on the first line. (Reserved words in Logo cannot be used as variables and have a well-defined meaning and use.) It has the reserved word ‘end’ on the last line.
A subprogram is a named sequence of steps for another program to execute. Other names for subprograms are procedures and functions. In Logo, you tell the computer how to do something — for example −
Once we have described our procedure to Logo, we can enter its name on the command line, just as we would do to any of the built-in things. In this case, we would type ‘square’ on the command line and Logo looks up the commands to make a square.
Click the button that says Edall (for edit all) to bring up Logo's built-in editor. (If your Logo doesn't have an Edall button, type ‘edall’ on the command line). The following code block has the required structure of the subprogram.
The procedure or subprogram must start with the word ‘to’, followed by a name we think of. The next step is to key-in all the same steps we would write on the command line. The procedure must end with the word ‘end’. All comment or remark lines should be preceded by semi-colon (;).
Following is the practical demonstration of the above example −
Now, from the command line, execute the procedure using its name “square” as shown below −
Procedures can not only contain built-in commands, but they can also contain other procedures.
In the following example, a procedure ‘flower’ is calling our predefined procedure ‘square’ from its body.
Following screenshot shows the output when the procedure “flower” is called −
We don't want every square to be of the same size — we want variety. In Logo, we create variables, whose values we can change. We will use the same square procedure with a small change in the following example.
We give Logo a replacement value for ‘:n’ on the command line as shown below.
Here is the practical demonstration of the above example −
Now let us discuss how to pass two arguments to a procedure. Following screenshot is a practical demonstration of the same.
Here's a step-by-step guide.
Please try the procedure and tell me if it works for you.
1. Launch LOGO.
2. Press EDALL button.
3. Type into the editor window so that it looks like this:
to chris1
fd 100 rt 91
end
to chris2
repeat 45 [chris1]
end
4. On the editor window click FILE - SAVE AND EXIT.
Mswlogo Free Download
5. On the MSWLogo Screen window click FILE _ SAVE AS.6. Save in My Documents, with the filename 'chris' (without the quotes).
7. Close down LOGO.
8. Launch LOGO.
9. On the MSWLogo Screen window click FILE _ LOAD.
10. Click on the file 'chris.LGO'.
Can We Msw Logo Designs
11. In the command line at the bottom of commander type 'chris1' andpress enter.
12. In the command line at the bottom of commander type 'chris2' and
press enter.
Now tell me - did it work as you expected?
Or do my instructions need improving?
How Can We Download Msw Logo
Chris