"""
This Python program computes and prints the area of a triangle with
sides, a, b, and c using the 'Heron' (of Alexandria, 60 AD) method.
"""

def triangleArea(a, b, c):
    s = 0.5 * (a + b + c) # the semiperimeter

    if s >= max(a, b, c):
        return (s * (s - a) * (s - b) * (s - c))**0.5
    else:
        raise ValueError("improper triangle specified")


if __name__ == '__main__':

    # These are the lengths of the sides of the triangle.
    # (This is a right triangle, but it doesn't have to be.)
    a = 3
    b = 4
    c = 5

    print("the area is", triangleArea(a, b, c))
