class Triangle: @staticmethod def other_angle(a, b): return 180 - (a + b) @staticmethod def triangle_type_angle(a, b, c): if all( angle < 90 for angle in (a, b ,c)): return "Acute Triangle" if any(angle == 90 for angle in (a, b, c)): return "Right Triangle" return "Obtuse Triangle" @staticmethod def triangle_type_sides(s1, s2, s3): if s1 == s2 == s3: return "Equilateral Triangle" elif s1 == s2 or s2 == s3 or s1 == s3: return "Isoceles Triangle" return "Scalene Triangle"
- class Triangle:
- @staticmethod
- def other_angle(a, b):
- return 180 - (a + b)
- @staticmethod
- def triangle_type_angle(a, b, c):
- if all( angle < 90 for angle in (a, b ,c)):
- return "Acute Triangle"
- if any(angle == 90 for angle in (a, b, c)):
- return "Right Triangle"
- return "Obtuse Triangle"
- @staticmethod
- def triangle_type_sides(s1, s2, s3):
- if s1 == s2 == s3:
- return "Equilateral Triangle"
- elif s1 == s2 or s2 == s3 or s1 == s3:
- return "Isoceles Triangle"
- return "Scalene Triangle"