Volume of biggest sphere within a right circular cylinder | Function to find the biggest sphere ; radius and height cannot be negative ; radius of sphere ; Driver code
def sph ( r , h ) : NEW_LINE INDENT if ( r < 0 and h < 0 ) : NEW_LINE INDENT return - 1 NEW_LINE DEDENT R = r NEW_LINE return float ( R ) NEW_LINE DEDENT r , h = 4 , 8 NEW_LINE print ( sph ( r , h ) ) NEW_LINE