На import turtle
def draw_arc(t, radius, color):
t.penup()
t.goto(0, -radius)
t.pendown()
t.color(color)
t.setheading(60)
t.circle(radius, 120)
def draw_cloud(t, x, y, scale):
t.penup()
t.goto(x, y)
t.pendown()
t.color("white"
t.begin_fill()
for _ in range(2):
t.circle(scale, 90)
t.circle(scale // 2, 90)
t.end_fill()
def draw_sun(t, x, y, radius):
t.penup()
t.goto(x, y)
t.pendown()
t.color("yellow"
t.begin_fill()
t.circle(radius)
t.end_fill()
def draw_rainbow():
screen = turtle.Screen()
screen.bgcolor("lightblue"
rainbow_colors = ["#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#0000FF", "#4B0082", "#8A2BE2"]
radius = 200
t = turtle.Turtle()
t.speed(0)
t.width(10)
# Draw rainbow arcs
for color in rainbow_colors:
draw_arc(t, radius, color)
radius -= 10
# Draw sun
draw_sun(t, -250, 150, 50)
# Draw clouds
draw_cloud(t, -150, -100, 60)
draw_cloud(t, 100, -120, 50)
t.hideturtle()
screen.mainloop()
if __name__ == "__main__":
draw_rainbow()