Minimum area of square holding two identical rectangles | Function to find the area of the square ; Larger side of rectangle ; Smaller side of the rectangle ; Driver code
def areaSquare ( L , B ) : NEW_LINE INDENT large = max ( L , B ) NEW_LINE small = min ( L , B ) NEW_LINE if ( large >= 2 * small ) : NEW_LINE INDENT return large * large NEW_LINE DEDENT else : NEW_LINE INDENT return ( 2 * small ) * ( 2 * small ) NEW_LINE DEDENT DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT L = 7 NEW_LINE B = 4 NEW_LINE print ( areaSquare ( L , B ) ) NEW_LINE DEDENT