triangle turtle python code example
Example 1: python turtle triangle
import turtle
s = turtle.getscreen()
q = turtle.Turtle()
q.fd(100)
q.rt(90)
q.fd(100)
q.lt(-130)
q.fd(150)
Example 2: how to make a triangle in python turtle
import turtle
board = turtle.Turtle()
board.forward(100) # draw base
board.left(120)
board.forward(100)
board.left(120)
board.forward(100)
turtle.done()