SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Microsoft® Small Basic Turtle Graphics Estimated time to complete this lesson: 1 hour
Turtle Graphics In this lesson, you will learn about: Using the Turtle object to move the Turtle on the screen. Using the various properties and operations of the Turtle object to create graphics. Drawing colorful designs by using the Turtle object in For..EndFor loops.
Meet the Turtle  The Turtle is displayed on the screen. Meet your new friend in Small Basic—the Turtle! The Turtle helps you draw interesting graphics on the graphics window. You can display the Turtle by using the Show operation.  Click the               button on the toolbar.
Properties and Operations of the Turtle Object 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… 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.  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.  To draw with the Turtle, you use the PenDown operation. If you want the Turtle to stop drawing on the screen, use the PenUpoperation.
Properties and Operations of the Turtle Object Let’s have a look at some more functions… 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. 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. 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.
Making the Turtle Move Let us start by making the Turtle draw a simple triangle on the screen. output Click the               button on the toolbar.
Having Fun with the Turtle Now that you know how to communicate with the Turtle, let’s use it for some fun activities. 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. You can use the PenColor property of the GraphicsWindow object to add color to your design.
Having Fun with the Turtle 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. output
Let’s Summarize… Congratulations! Now you know how to: Use the Turtle object to move the Turtle on the screen. Use the various properties and operations of the Turtle object to create graphics. Draw colorful designs by using the Turtle object in For..EndFor loops.
It’s Time to Apply Your Learning… Write a program to display a Turtle and use it to draw colorful graphics by performing the following steps: ,[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, DictionaryPython Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, DictionarySoba Arjun
 
Teach your kids how to program with Python and the Raspberry Pi
Teach your kids how to program with Python and the Raspberry PiTeach your kids how to program with Python and the Raspberry Pi
Teach your kids how to program with Python and the Raspberry PiJuan Gomez
 
JavaScript Basics And DOM Manipulation
JavaScript Basics And DOM ManipulationJavaScript Basics And DOM Manipulation
JavaScript Basics And DOM ManipulationSiarhei Barysiuk
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Simplilearn
 
Immutable vs mutable data types in python
Immutable vs mutable data types in pythonImmutable vs mutable data types in python
Immutable vs mutable data types in pythonLearnbay Datascience
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...Simplilearn
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaEdureka!
 
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaPython NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaEdureka!
 
CSS Position and it’s values
CSS Position and it’s valuesCSS Position and it’s values
CSS Position and it’s valuesGunjan Tulsiani
 
Microsoft Office Introduction
Microsoft Office IntroductionMicrosoft Office Introduction
Microsoft Office IntroductionAnitha Rao
 
Machine Learning
Machine LearningMachine Learning
Machine LearningKumar P
 
Corel draw 14 hindi notes
Corel draw 14 hindi notesCorel draw 14 hindi notes
Corel draw 14 hindi notesSirajRock
 
Sorting Techniques
Sorting TechniquesSorting Techniques
Sorting TechniquesRafay Farooq
 
Machine learning ppt
Machine learning ppt Machine learning ppt
Machine learning ppt Poojamanic
 
What is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaWhat is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaEdureka!
 

Was ist angesagt? (20)

Python Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, DictionaryPython Variable Types, List, Tuple, Dictionary
Python Variable Types, List, Tuple, Dictionary
 
Anti aliasing Computer Graphics
Anti aliasing Computer GraphicsAnti aliasing Computer Graphics
Anti aliasing Computer Graphics
 
Python programming : Standard Input and Output
Python programming : Standard Input and OutputPython programming : Standard Input and Output
Python programming : Standard Input and Output
 
Teach your kids how to program with Python and the Raspberry Pi
Teach your kids how to program with Python and the Raspberry PiTeach your kids how to program with Python and the Raspberry Pi
Teach your kids how to program with Python and the Raspberry Pi
 
JavaScript Basics And DOM Manipulation
JavaScript Basics And DOM ManipulationJavaScript Basics And DOM Manipulation
JavaScript Basics And DOM Manipulation
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
 
Immutable vs mutable data types in python
Immutable vs mutable data types in pythonImmutable vs mutable data types in python
Immutable vs mutable data types in python
 
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
What is Machine Learning | Introduction to Machine Learning | Machine Learnin...
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
 
Arrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | EdurekaArrays In Python | Python Array Operations | Edureka
Arrays In Python | Python Array Operations | Edureka
 
Queue
QueueQueue
Queue
 
Python NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | EdurekaPython NumPy Tutorial | NumPy Array | Edureka
Python NumPy Tutorial | NumPy Array | Edureka
 
Php array
Php arrayPhp array
Php array
 
CSS Position and it’s values
CSS Position and it’s valuesCSS Position and it’s values
CSS Position and it’s values
 
Microsoft Office Introduction
Microsoft Office IntroductionMicrosoft Office Introduction
Microsoft Office Introduction
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Corel draw 14 hindi notes
Corel draw 14 hindi notesCorel draw 14 hindi notes
Corel draw 14 hindi notes
 
Sorting Techniques
Sorting TechniquesSorting Techniques
Sorting Techniques
 
Machine learning ppt
Machine learning ppt Machine learning ppt
Machine learning ppt
 
What is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | EdurekaWhat is Tuple in python? | Python Tuple Tutorial | Edureka
What is Tuple in python? | Python Tuple Tutorial | Edureka
 

Andere mochten auch

2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics windowallenbailey
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapesallenbailey
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basicallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-commanddat298
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)saobiennt
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacherfarah510
 
Logo primitives
Logo primitivesLogo primitives
Logo primitivessshaner88
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)saobiennt
 
Turtle graphics
Turtle graphicsTurtle graphics
Turtle graphicsgrahamwell
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objectsallenbailey
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
Second commandment
Second  commandmentSecond  commandment
Second commandmentMaria Ida Yu
 
First commandment
First commandmentFirst commandment
First commandmentrenzijonas
 

Andere mochten auch (20)

2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics window
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapes
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basic
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 
Basic logo-command
Basic logo-commandBasic logo-command
Basic logo-command
 
In-bai tap logo_01 (hsinh)
  In-bai tap logo_01 (hsinh)  In-bai tap logo_01 (hsinh)
In-bai tap logo_01 (hsinh)
 
Msw logo
Msw logoMsw logo
Msw logo
 
Msw logo application user manual for teacher
Msw logo application user manual for teacherMsw logo application user manual for teacher
Msw logo application user manual for teacher
 
Logo primitives
Logo primitivesLogo primitives
Logo primitives
 
Geometria de las Tortugas
Geometria de las  TortugasGeometria de las  Tortugas
Geometria de las Tortugas
 
In-bai tap logo_02 -thu tuc (gv)
  In-bai tap logo_02 -thu tuc (gv)  In-bai tap logo_02 -thu tuc (gv)
In-bai tap logo_02 -thu tuc (gv)
 
Logo
LogoLogo
Logo
 
Small basic
Small basicSmall basic
Small basic
 
Turtle graphics
Turtle graphicsTurtle graphics
Turtle graphics
 
La Tortuga Gráfica - Small Basic
La Tortuga Gráfica - Small BasicLa Tortuga Gráfica - Small Basic
La Tortuga Gráfica - Small Basic
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
 
1.3 variables
1.3   variables1.3   variables
1.3 variables
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
Second commandment
Second  commandmentSecond  commandment
Second commandment
 
First commandment
First commandmentFirst commandment
First commandment
 

Ähnlich wie 2.2 turtle graphics

7.Advanced Scripts in Scratch.pptx
7.Advanced Scripts in Scratch.pptx7.Advanced Scripts in Scratch.pptx
7.Advanced Scripts in Scratch.pptxdipalishewale2
 
Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbookBarbara M. King
 
Star logo nova code cookbook(1)
Star logo nova  code cookbook(1)Star logo nova  code cookbook(1)
Star logo nova code cookbook(1)Barbara M. King
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to eventsallenbailey
 
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...Nuzhat Memon
 
Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditBibekPandit2
 
1. production experiments
1. production experiments1. production experiments
1. production experimentsbronparsons
 
Scratch MIT Coding Basics
Scratch MIT Coding BasicsScratch MIT Coding Basics
Scratch MIT Coding BasicsProAryamanGamer
 
Alice01
Alice01Alice01
Alice01h2vs10
 
The Adventures of Mike, How to Use Scratch 2.0 to Program Your Game
The Adventures of Mike, How to Use Scratch 2.0 to Program Your GameThe Adventures of Mike, How to Use Scratch 2.0 to Program Your Game
The Adventures of Mike, How to Use Scratch 2.0 to Program Your GameUna Tao
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflowluisfvazquez1
 
Sharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib ImagesSharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib ImagesEmmanuel Sotter
 

Ähnlich wie 2.2 turtle graphics (20)

7.Advanced Scripts in Scratch.pptx
7.Advanced Scripts in Scratch.pptx7.Advanced Scripts in Scratch.pptx
7.Advanced Scripts in Scratch.pptx
 
Maya
MayaMaya
Maya
 
02 unity 3_d_part_1
02 unity 3_d_part_102 unity 3_d_part_1
02 unity 3_d_part_1
 
Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbook
 
Star logo nova code cookbook(1)
Star logo nova  code cookbook(1)Star logo nova  code cookbook(1)
Star logo nova code cookbook(1)
 
03 unity 3_d_part_2
03 unity 3_d_part_203 unity 3_d_part_2
03 unity 3_d_part_2
 
4.2 responding to events
4.2   responding to events4.2   responding to events
4.2 responding to events
 
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...Std 11 Computer Chapter 2 Animation Tool:  synfig (Part 2 Different Tools in ...
Std 11 Computer Chapter 2 Animation Tool: synfig (Part 2 Different Tools in ...
 
Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek pandit
 
1. production experiments
1. production experiments1. production experiments
1. production experiments
 
Scratch MIT Coding Basics
Scratch MIT Coding BasicsScratch MIT Coding Basics
Scratch MIT Coding Basics
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
 
Alice01
Alice01Alice01
Alice01
 
Scratch Lesson 2
Scratch Lesson 2Scratch Lesson 2
Scratch Lesson 2
 
03 whack a-witch!
03 whack a-witch!03 whack a-witch!
03 whack a-witch!
 
Keynote
KeynoteKeynote
Keynote
 
How do i
How do iHow do i
How do i
 
The Adventures of Mike, How to Use Scratch 2.0 to Program Your Game
The Adventures of Mike, How to Use Scratch 2.0 to Program Your GameThe Adventures of Mike, How to Use Scratch 2.0 to Program Your Game
The Adventures of Mike, How to Use Scratch 2.0 to Program Your Game
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflow
 
Sharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib ImagesSharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib Images
 

Mehr von allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detectionallenbailey
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapesallenbailey
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls objectallenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objectsallenbailey
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objectsallenbailey
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operationsallenbailey
 

Mehr von allenbailey (13)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detection
 
4.1 playing with shapes
4.1   playing with shapes4.1   playing with shapes
4.1 playing with shapes
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls object
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objects
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objects
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operations
 

Kürzlich hochgeladen

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

2.2 turtle graphics

  • 1. Microsoft® Small Basic Turtle Graphics Estimated time to complete this lesson: 1 hour
  • 2. Turtle Graphics In this lesson, you will learn about: Using the Turtle object to move the Turtle on the screen. Using the various properties and operations of the Turtle object to create graphics. Drawing colorful designs by using the Turtle object in For..EndFor loops.
  • 3. Meet the Turtle The Turtle is displayed on the screen. Meet your new friend in Small Basic—the Turtle! The Turtle helps you draw interesting graphics on the graphics window. You can display the Turtle by using the Show operation. Click the button on the toolbar.
  • 4. Properties and Operations of the Turtle Object 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… 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. 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. To draw with the Turtle, you use the PenDown operation. If you want the Turtle to stop drawing on the screen, use the PenUpoperation.
  • 5. Properties and Operations of the Turtle Object Let’s have a look at some more functions… 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. 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. 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.
  • 6. Making the Turtle Move Let us start by making the Turtle draw a simple triangle on the screen. output Click the button on the toolbar.
  • 7. Having Fun with the Turtle Now that you know how to communicate with the Turtle, let’s use it for some fun activities. 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. You can use the PenColor property of the GraphicsWindow object to add color to your design.
  • 8. Having Fun with the Turtle 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. output
  • 9. Let’s Summarize… Congratulations! Now you know how to: Use the Turtle object to move the Turtle on the screen. Use the various properties and operations of the Turtle object to create graphics. Draw colorful designs by using the Turtle object in For..EndFor loops.
  • 10.
  • 11. Use the Turtle to draw two star-shaped graphics on the screen.
  • 12. Format the stars to be separate and colorful.

Hinweis der Redaktion

  1. You have learned how to use the text window and the graphics window. You have also learned about various statements, properties, and operations. Now, meet your new friend in Small Basic—the Turtle. With the help of the Turtle, you can draw shapes and graphics on the screen. You can hide the Turtle by using the Hide operation.Code:Turtle.Show()
  2. When you click Run on the Toolbar or press F5 on the keyboard, the Turtle draws a colored, square graphical design on the screen.Code:GraphicsWindow.Title = "Turtle Graphics"GraphicsWindow.Height = 320GraphicsWindow.Width = 300GraphicsWindow.PenColor = "purple"Turtle.Show()Turtle.Speed = 8Turtle.X = 150Turtle.Y = 150For i = 0 To 200 Step 5 Turtle.Move(i) Turtle.Turn(90)EndFor
  3. Solution: GraphicsWindow.Height = 400GraphicsWindow.Width = 400GraphicsWindow.Title = "Turtle Graphics"Turtle.Show()Turtle.Speed = 10Turtle.X = 100Turtle.Y = 200For i = 0 To 200 Step 5 GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()Turtle.Move(i) Turtle.Turn(150)EndForTurtle.PenUp()Turtle.Move(300)Turtle.Turn(105)Turtle.Move(150)Turtle.PenDown()For i = 0 To 200 Step 5 GraphicsWindow.PenColor = GraphicsWindow.GetRandomColor()Turtle.Move(i) Turtle.Turn(150)EndFor