import turtle
# Set up the turtle
t = turtle.Turtle()
t.speed(2)
t.penup()
# Define scaling factor
scale_factor = 3.5
# Draw the kite
t.fillcolor("orange")
t.begin_fill()
t.goto(0, 100 * scale_factor)
t.goto(-100 * scale_factor, 0)
t.goto(0, 0)
t.end_fill()
t.fillcolor("pink")
t.begin_fill()
t.goto(100 * scale_factor, 0)
t.goto(0, 100 * scale_factor)
t.goto(0, 0)
t.end_fill()
t.fillcolor("cyan")
t.begin_fill()
t.goto(-100 * scale_factor, 0)
t.goto(0, -100 * scale_factor)
t.goto(0, 0)
t.end_fill()
t.fillcolor("green")
t.begin_fill()
t.goto(100 * scale_factor, 0)
t.goto(0, -100 * scale_factor)
t.end_fill()
t.fillcolor("yellow")
t.begin_fill()
t.goto(50 * scale_factor, -150 * scale_factor)
t.goto(-50 * scale_factor, -150 * scale_factor)
t.goto(0, -100 * scale_factor)
t.end_fill()
# Write text
t.penup()
t.goto(200, 100 * scale_factor)
t.write("Happy Makar Sankranti", align="center", font=("Arial", 16, "bold"))
# Close the turtle graphics window when clicked
turtle.exitonclick()
#clcoding.com
0 Comments:
Post a Comment