Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- This is an example of the package: turtle
- """
- import turtle
- allen = turtle.Turtle()
- window = turtle.Screen()
- window.title("Allen")
- window.colormode(255)
- window.bgcolor(14, 176, 30)
- allen.speed(7)
- allen.color()
- turtle.delay(0)
- #Polygon with 2 parameters (num sides, side lengh)
- def poly(numSides, sideLength):
- for i in range(numSides):
- allen.forward(sideLength)
- allen.right(360/numSides)
- #Standard FOR loop
- for i in range(1000):
- poly(10, i)
- allen.right(4)
Advertisement
Add Comment
Please, Sign In to add comment