import turtle
# Create a turtle screen
screen = turtle.Screen()
# Create a turtle object
t = turtle.Turtle()
# Function to draw an equilateral triangle
def draw_triangle(side_length):
for _ in range(3):
t.forward(side_length)
t.left(120)
# Set turtle speed
t.speed(1)
# Position the turtle
t.penup()
t.goto(-50, -50) # Adjust these coordinates for the triangle's position
t.pendown()
# Draw an equilateral triangle with side length of 100 units
draw_triangle(100)
# Close the screen on click
screen.exitonclick()
To embed this program on your website, copy the following code and paste it into your website's HTML: