Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from turtle import *
- from random import *
- colormode(255)
- def randomcolor():
- red = randint(0, 255)
- green = randint(0, 255)
- blue = randint(0, 255)
- color(red, green, blue)
- def randomplace():
- penup()
- x = randint(-200, 200)
- y = randint(-200, 200)
- goto(x, y)
- pendown()
- def randomheading():
- numero = randint(1, 360)
- setheading(numero)
- def drawcirculo():
- r = randint(3, 150)
- randomcolor()
- randomplace()
- #randomheading()
- hideturtle()
- dot(r)
- def drawrectangulo():
- randomcolor()
- randomplace()
- #randomheading()
- hideturtle()
- largo = randint(3, 150)
- alto = randint(3, 150)
- begin_fill()
- forward(largo)
- right(90)
- forward(alto)
- right(90)
- forward(largo)
- right(90)
- forward(alto)
- right(90)
- end_fill()
- shape()
- speed(90)
- clear()
- setheading(0)
- for i in range(60):
- drawcirculo()
- for i in range (40):
- drawrectangulo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement