Advertisement
timber101

Turtle_Basics_Part_5

Mar 20th, 2022
935
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None
  1. # the goto function
  2.  
  3. import turtle, random
  4.  
  5. wn = turtle.Screen()
  6.  
  7. pragya = turtle.Turtle()
  8. pragya.speed(100)
  9.  
  10.  
  11. for i in range(100):
  12.     xpos = random.randint(-450, 450)
  13.     ypos = random.randint(-350, 350)
  14.     pragya.penup()
  15.     pragya.goto(xpos, ypos)
  16.     pragya.stamp()
  17.  
  18. wn.exitonclick()
  19.  
Advertisement
RAW Paste Data Copied
Advertisement