Draw Triangle in Python Using Turtle

Python Program to Draw Triangle Using Turtle

#Draw Triangle in Python Using Turtle

import turtle

tina = turtle.Turtle()
tina.shape("turtle")
tina.width(4)
tina.penup()
tina.goto(0,60)
tina.pendown()
tina.color("green")
 

for i in range(5):
	tina.right(120)
	tina.forward(130)
	tina.right(120)
	tina.forward(130)
	tina.right(120)
	tina.forward(130)  
	tina.right(72)
 
tina.color("red")
tina.penup()
tina.forward(40)
tina.backward(40)

Output:

Draw Triangle in Python

About The Author