A program in python to check if a triangle is an equilateral or an isosceles or a scalene triangle.

In the above Python program to check if a triangle is an equilateral or an isosceles or a scalene triangle, we will use conditional statements which will give us the desired results. For Equilateral triangle all sides should be equal, For Isosceles triangle any two sides should be equal and if no sides are equal then it is a Scalene triangle.

print("Input lengths of the triangle sides: ")
a = int(input("a: "))
b = int(input("b: "))
c = int(input("c: "))

if a == b == c:
	print("It is an Equilateral triangle")
elif a==b or b==c or c==a:
	print("It is an Isosceles triangle")
else:
	print("It is a Scalene triangle")
Sample Output:
Input lengths of the triangle sides: 
a: 6
b: 21
c: 12
It is a Scalene triangle