Turtle python задания
переменные
задания
пример 1 |
пример 2 |
пример 3 |
пример 4 |
|
|
|
|
|
|
|
|
|
|
код 1
from turtle import *
speed(0)
pensize(2)
n = 10
dl = 50
r = 10
for i in range(n):
fd(dl)
rt(90)
circle(r)
lt(90)
bk(dl)
lt(360/n)
dl += 5
r += 2
ht()
done()
|
код 2
from turtle import *
speed(0)
pensize(2)
pu()
bk(250)
pd()
n = 10
rad = 10
dl = 40
lt(90)
for i in range(n):
fd(dl)
lt(90)
fd(rad)
circle(-rad, 180)
lt(180)
circle(-rad, 180)
lt(90)
circle(-rad, 180)
lt(90)
circle(-rad, 180)
lt(180)
circle(-rad, 180)
fd(rad)
lt(90)
fd(dl)
lt(90)
pu()
fd(rad*4.9)
pd()
lt(90)
rad += 2
dl *= 1.2
ht()
done()
|
|
|
|
|
|
Последнее изменение: Пятница, 7 апреля 2023, 10:15