Largest sphere that can be inscribed inside a cube | Function to find the radius of the sphere ; side cannot be negative ; radius of the sphere ; Driver code
def sphere ( a ) : NEW_LINE INDENT if ( a < 0 ) : NEW_LINE INDENT return - 1 NEW_LINE DEDENT r = a / 2 NEW_LINE return r NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT a = 5 NEW_LINE print ( sphere ( a ) ) NEW_LINE DEDENT