What is a Triangle? A triangle is a polygon with three sides. The sum of…