import turtle
def draw_star(x, y, length):
turtle.penup()
turtle.goto(x, y)
turtle.pendown()
for i in range(5):
turtle.forward(length)
turtle.right(144)
length = int(turtle.numinput("Длина стороны", "Введите длину стороны: ", 100, 1, 300))
draw_star(0, 0, length)
turtle.done()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import turtle
def draw_star(x, y, length):
turtle.penup()
turtle.goto(x, y)
turtle.pendown()
for i in range(5):
turtle.forward(length)
turtle.right(144)
length = int(turtle.numinput("Длина стороны", "Введите длину стороны: ", 100, 1, 300))
draw_star(0, 0, length)
turtle.done()