/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/python/lab-111-016/main.py
24 строки
628 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
import turtle import math def draw_flower_petals(radius: float, petal_count: int, petal_radius: float, fill: bool = False): t = turtle.Turtle() t.speed(0) angle_step = 360.0 / petal_count for i in range(petal_count): t.penup() t.goto(radius * math.cos(math.radians(i * angle_step)), radius * math.sin(math.radians(i * angle_step))) t.setheading(i * angle_step) t.pendown() if fill: t.begin_fill() t.circle(petal_radius) if fill: t.end_fill() t.hideturtle() draw_flower_petals(100, 10, 100) turtle.done()