Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

3,138 views

2,882 views

2,882 views

Published on

No Downloads

Total views

3,138

On SlideShare

0

From Embeds

0

Number of Embeds

380

Shares

0

Downloads

42

Comments

0

Likes

3

No embeds

No notes for slide

- 1. Microsoft® Small Basic<br />Turtle Graphics<br />Estimated time to complete this lesson: 1 hour<br />
- 2. Turtle Graphics<br />In this lesson, you will learn about:<br />Using the Turtle object to move the Turtle on the screen.<br />Using the various properties and operations of the Turtle object to create graphics.<br />Drawing colorful designs by using the Turtle object in For..EndFor loops.<br />
- 3. Meet the Turtle <br />The Turtle is displayed on the screen.<br />Meet your new friend in Small Basic—the Turtle! The Turtle helps you draw interesting graphics on the graphics window.<br />You can display the Turtle by using the Show operation. <br />Click the button on the toolbar.<br />
- 4. Properties and Operations of the Turtle Object<br />You can give commands to the Turtle by using the Turtle object. In turn, the Turtle draws graphics on the screen. Let’s look at some of these functions…<br />To set the location of the Turtle on the screen, you can specify the x- and y-coordinates by using the X and Y properties of the Turtle object. <br />To move the Turtle for a particular distance, you can use the Move operation. Similarly, you can use the MoveTo operation, and specify the x- and y-coordinates of the location where you want the Turtle to move. <br />To draw with the Turtle, you use the PenDown operation. If you want the Turtle to stop drawing on the screen, use the PenUpoperation.<br />
- 5. Properties and Operations of the Turtle Object<br />Let’s have a look at some more functions…<br />To set the speed of the Turtle, you use the Speed property. You can choose a value from 1 to 10, 1 being the slowest and 10 being the fastest.<br />To turn the Turtle, use the Turn operation. When using this operation, you define an angle in degrees. Alternatively, you can also use the TurnRightandTurnLeftoperations, which turn the Turtle by 90 degrees to the right and left, respectively.<br />To turn the Turtle by a specific angle of rotation, you can use the Angle property and define the angle of rotation in degrees. The default angle of the Turtle is 0 degrees. An angle of 0 degrees means the turtle is facing up on the screen.<br />
- 6. Making the Turtle Move<br />Let us start by making the Turtle draw a simple triangle on the screen.<br />output<br />Click the button on the toolbar.<br />
- 7. Having Fun with the Turtle<br />Now that you know how to communicate with the Turtle, let’s use it for some fun activities.<br />Let’s use the For loop and instruct the Turtle to move and turn at specific distances and angles, creating a unique graphical design in the process.<br />You can use the PenColor property of the GraphicsWindow object to add color to your design.<br />
- 8. Having Fun with the Turtle<br />You can also use the Turtle to create multiple, colorful graphics on the screen. Let’s look at a program that provides our desired output.<br />output<br />
- 9. Let’s Summarize…<br />Congratulations! Now you know how to:<br />Use the Turtle object to move the Turtle on the screen.<br />Use the various properties and operations of the Turtle object to create graphics.<br />Draw colorful designs by using the Turtle object in For..EndFor loops.<br />
- 10. It’s Time to Apply Your Learning…<br />Write a program to display a Turtle and use it to draw colorful graphics by performing the following steps:<br /><ul><li>Set the height and width of the graphics window to 400.
- 11. Use the Turtle to draw two star-shaped graphics on the screen.
- 12. Format the stars to be separate and colorful.</li>

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment