Instructions for using basic mswlogo
Mswlogo is a programming tool for beginners, a programming language created special so that users can have fun and learn programming art. With Mswlogo, people can draw, design and perform calculations, based on logo computer language platforms, with graphic user interface (GUI). This is an open and free source programming software, with the source code available in Borland C ++, supporting turtle programming and 3D graphics.
In this article, let’s find out How to use the basic MSWlogo for beginnersmaking programming easier.
Operations using basic mswlogo
What is turtle in Mswlogo?
Turtle is a triangle drawing on the graphic window of the logo according to the command that the user enters. The center of the graphic screen is the house of the turtle. These commands are also known as Primitives. Primitives are entered into the bar called Command Input Box. The simple logo painting commands move the turtle and back as well as turn it to the right or left. Their abbreviations and abbreviations are shown below:
| Command | Act |
| FD (Forward) | To move the turtle forward. |
| BK (Back) | To move the turtle back. |
| RT (Right) | To move the turtle to the right. |
| LT (Left) | To move the turtle to the left. |
| HT (Hideturtle) | Hide |
| St (Showturtle) | Show turtles |
| CS (Clearscreen) | To delete the screen and bring the turtle to the home position. |
| CT (Cleeartext) | To delete all commands in the recovered list box. |
| Seth | To rotate the turtle to the original position. |
| Home | To bring the turtle to its home position. |
| Write | |
| Sum | To add two numbers. |
| Bye | Basic shortcut to exit the logo. |
| Difference | To subtract this number for another. |
| Product | To multiply the number. |
| Quotient | To display the injury of two numbers. |
| Remairic | To display the rest of the two numbers. |
| Clean | To delete all graphics in the graphic window. |
Except command CSeach of these commands must be followed by a value called its argument. The arguments of FD and BK is the unit, RT and LT The corners may be any integer. Rotation 360 is a complete rotation, so rotate 375 degrees equal to 1/15 degrees.
Graphic window has coordinate system. The value of the two coordinates (usually called X and Y) at the center is 0.0. In the northeast corner is 250,250; In the southeast corner is 250, -250. In the southwest corner of -250, -250; …
Many programming systems operate on the same type of XY coordinate plane, two axes also operate with algebra. Here, 0 0 is the center or the original (no commas or parentheses here). In normal zoom in the middle, the screen of the logo displays an area of about 150 points up or down and 300 points to the right or contrary to the center.
Turtles in mswlogo
People can refer to the summary of commands and how to enter the MSWlogo command to learn more about the tortoise control commands in this programming software.
Turtle and pen control
The logo has a number of other drawing commands, given below:
| Command | Act |
| Penup (Pu) | Move the turtle without leaving traces. |
| Pendown (PD) | Move the turtle and leave traces. |
| setpensize | Make the pen bigger, easier to see. The default pen size is -[1 1]. |
Command Pendown and Penup Ask turtles to leave ink on the screen when it moves or does not leave ink. Commands hideturtle and showturtle The turtle can be hidden or does not affect the ability to leave ink when it moves. Command Home Causes the turtle back in the middle of the screen. It can leave ink when the turtle returns to the middle of the screen. Command setpensize Decide the size of the pen.
The logo has a number of other additional drawing commands, some of which are given below.
- Home
- Cleeartext or CT
- Label
- setxy
Command Label Take a single word as a chain quoted (for example, “A_string”) or a list of words in square brackets [ ] No quotes (for example: [một chuỗi chữ cái]) and print them on the graphic window at the position of the turtle. Consider the following code.
Command setxy Take two arguments, considering the first argument as the value of the horizontal axis (horizontal axis) and the second argument is the value of the vertical axis (vertical axis). This command is placed at these coordinates, which can leave ink when it comes to those coordinates.
Command Cleeartextabbreviated as CT, delete the text area of the command window.
Variables
The variable is the name of a memory position may contain a value. In the computer, each memory position has an integer address. Because it will be difficult to remember the address of each position containing a value used by the program, computer scientists have found a way to set these positions symbolic names. When a variable has a name, people can use and manipulate it.
The variable is the names set as a series of letters. The variable name may contain letters (regardless of normal capital), digits and lower bricks. Can access the variable name in the calculation by using the sign ‘:’ Before the variable name. Consider the following example in screenshots.
In the above example, two variables are defined First_name, 100_last_name_200 and initialized them with Amal and DAS values with the following statements:
- Make “First_name” Amal
- Make “100_last_name_200“ das
Also, proceed to print these two variables by statements Print : First_name and Print: 100_last_name_200.




Post Comment