Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #здесь будет код третьей программы
- from turtle import *
- from random import *
- speed('fastest')
- def vshape(size):
- right(25)
- forward(size)
- backward(size)
- left(50)
- forward(size)
- backward(size)
- right(25)
- def snowflakeArm(size):
- for i in range(4):
- forward(size)
- vshape(size)
- backward(4 * size)
- colormode(255)
- def snowflake(size, x, y):
- penup()
- goto(x, y)
- pendown()
- angle = randint(0, 60)
- setheading(angle)
- r = randint(0,255)
- g = randint(0,255)
- b = randint(0,255)
- color(r, g, b)
- for i in range(6):
- snowflakeArm(size)
- right(60)
- for i in range(2):
- a = randint(15,25)
- x = randint(-int(window_width()/2), int(window_width()/2))
- y = randint(-int(window_height()/2), int(window_height()/2))
- snowflake(a, x, y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement