def trapezoid_area(height, top, bottom):
    """
    Computes the area of a trapezoid with the given height and top/bottom
    lengths.
    """
    return (
        # triangle based on longer - shorter of the top/bottom
        0.5 * abs(top - bottom) * height
        # plus parallelogram based on shorter edge
      + min(top, bottom) * height
    )