python Turtle Graphics Design with Random Colours #shorts

preview_player
Показать описание
from turtle import *
import random

speed(10)
bgcolor('black')

def new():
colormode(255)
fillcolor(r,g,b)
begin_fill()
fd(150)
lt(150)
fd(70)
lt(120)
fd(20)
rt(120)
fd(70)
circle(20,120)
fd(64)
circle(20,120)
fd(70)
rt(120)
fd(20)
lt(120)
fd(70)
end_fill()

for i in range(7):
new()
goto(0,0)
lt(20)

done()
Рекомендации по теме