Advertisement
Guest User

assignment_2b.py

a guest
Mar 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import turtle
  2. wn=turtle.Screen(800,800)
  3. wn.bgcolor("light green")
  4.  
  5.  
  6. tom = turtle.Turtle()
  7. tom.shape("turtle")
  8. tom.width(4)
  9. tom.penup()
  10. tom.goto(0,60)
  11. tom.pendown()
  12. tom.color("blue")
  13.  
  14. def drawCircle(self, x, y, radius=50):
  15.         """
  16.       Moves the turtle to the correct position and draws a circle
  17.        """
  18.     tom.penup()
  19.     tom.setposition(x, y)
  20.     tom.pendown()
  21.     tom.circle(radius)
  22.  
  23. drawCircle(75, 75, 20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement