write a program to input three sides of a triangle using switch case and suitable menu options print whether the triangle is equilateral ,isosceles, right or scalene triangle.
Answers
Answered by
1
Answer:
side1 = int(input("Enter 1st side of triangle = "))
side2 = int(input("Enter 2nd side of triangle = "))
side3 = int(input("Enter 3rd side of triangle = "))
if side1 == side2 == side3 :
print("It is a equilateral triangle ")
elif side1 == side2 != side3 or side1 != side2 == side3 or side1 == side3 != side2 :
print("It is a isosceles triangle ")
elif side1 != side2 != side3 :
print("It is a scalene triangle ")
Similar questions