class MyTriangle: def isValid(a, b, c): return a + b > c and a + c > b and b + c > a def area(a, b, c): p = (a + b + c) / 2 return (p * (p - a) * (p - b) * (p - c)) ** 0.5 def main(): a = float(input("Enter the a: ")) b = float(input("Enter the b: ")) c = float(input("Enter the c: ")) if MyTriangle.isValid(a, b, c): area = MyTriangle.area(a, b, c) print(f"The area of the triangle is {area}") else: print("Input is invalid") if __name__ == "__main__": main()