Advanced Python Programming
Graphics with Turtle
CH – 5
Lect-1
Compiled by :
Amisha D. Patel
Lecturer in [Link].
Gov. Polytechnic Valsad
Learning Outcomes
After actively interacting with the content, you will be able to:
Explain Turtle methods.
Explain turtle programming – loops and conditional statements
CO3: Draw graphics using the turtle module.
Turtle
Turtle is a special feathers of Python. Using Turtle, we
can easily draw in a drawing board.
First we import the turtle module. Then create a
window, next we create turtle object and using turtle
method we can draw in the drawing board.
Steps to work with Turtle library
1. import turtle
2. Create an object of turtle.
3. Draw or write around using the turtle methods.
4. [Link]()
Example
import turtle
t1=[Link]()
[Link]()
import turtle
t1=[Link]()
[Link]("black")
[Link]("red")
[Link](300,300)
[Link]("hello")
[Link]("First")
[Link]()
Turtle Methods
1. Turtle
2. Done()
3. Shape()
4. Shapesize()
5. Title()
6. Bgcolor()
7. Color()
8. Fillcolor()
9. Pencolor()
10. Pensize()
11. Speed()
import turtle
t1=[Link]()
[Link]("triangle")
[Link](5,5)
[Link]("First")
[Link]("black")
[Link]("red")
[Link]("blue")
[Link](300,300)
[Link]("hello")
[Link]()
import turtle
t1=[Link]()
[Link]("circle")
[Link](10)
[Link](5)
[Link](300)
[Link]()
Thank you