SHARE
TWEET

Untitled

a guest Sep 22nd, 2019 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from turtle import Turtle
  2. from random import random
  3. from random import randint
  4. import random
  5. def movement(name):
  6.     name.penup()
  7.    
  8.     x=randint(-300, 300)
  9.     y=randint(-300, 300)
  10.  
  11.     name.goto(x,y)
  12.     name.pendown()
  13.     c=["red","green","blue","yellow","orange","purple","pink","black"]
  14.     s=["turtle", "square","circle","triangle","classic"]
  15.     rand_s=random.choice(s)
  16.     name.color=random.choice(c)
  17.     name.shape=(rand_s)
  18.     name.stamp()
  19. d=Turtle()    
  20. for i in range(100):
  21.     movement(d)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top