A simple logic problem that uses if, else-if and else statements
angle1 = int(input())
angle2 = int(input())
angle3 = int(input())
sum_angles = angle1 + angle2 + angle3
if angle1 == angle2 and angle2 == angle3 and sum_angles == 180:
print("Equilateral")
elif (angle1 == angle2 or angle2 == angle3 or angle1 == angle3)\
and sum_angles == 180:
print("Isosceles")
elif angle1 != angle2 and angle2 != angle3 and angle1 != angle3\
and sum_angles == 180:
print("Scalene")
else:
print("Error")
Comments