Area of a triangle inscribed in a rectangle which is inscribed in an ellipse | Function to find the area of the triangle ; length of a and b cannot be negative ; area of the triangle ; Driver code
def area ( a , b ) : NEW_LINE INDENT if ( a < 0 or b < 0 ) : NEW_LINE INDENT return - 1 NEW_LINE DEDENT A = a * b NEW_LINE return A NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT a = 5 NEW_LINE b = 2 NEW_LINE print ( area ( a , b ) ) NEW_LINE DEDENT