Python – Triangles




# Christina Schneider
# Python Turtle (Triangles)
# 2-25-25
import turtle
t = turtle
t.pensize(3)
t.hideturtle()
t.pencolor('black')
t.penup()
#point 1
t.goto(-120,-80)
t.pendown()
#point 2
t.goto(0, 140)
#point 3
t.goto(120, -80)
#back to point 1
t.goto(-120, -80)
t.begin_fill()
t.color('green')
t.goto(0, 40)
t.goto(120,-80)
t.goto(-120, -80)
t.end_fill()
t.pencolor('black')
t.goto(120,-80)
t.goto(0,40)
t.goto(-120,-80)