Cube root in Python 3 using Bisection Search: Numbers in -1 to 0
There are some problems with your code, the algorithm being (too complicated, it is also) wrong.

In addition to that, you haven't made any functions, which you should strongly consider doing.

The better way of writing this script is to write two (or more) functions, one function being the actual cuberoot function which accepts one (or two) argument, namely the number you want to find the cube root for.  It should return one number, the cube root.

Writing functionality in function, or perhaps encapsulating functionality in functions allows you to more easily test the function.  Having all functionality in functions, also allows you to import cuberoot from a different file.  This is essential when building more complex applications and libraries later.

I have attached one example of how you can modularize your code so that it is both easy to test and easy to import, and not least of all, it's easy to read and thus understand.

As you can see in the while loop, it is quite close to your example, but a bit simplified.

I have also added an assert statetment in the main function to easily verify that the result is correct.  Adding automatic tests are now quite easy as well.

The bottommost __main__ part is there to ensure that the main function is called only if we call the file as a script:

$ python cuberoot.py -0.5
-0.7936859130859375




Here is the refactored code:

def cuberoot(cube, epsilon=0.0001):
    """Compute cube root of n using binary search.

    We yield the result when |result**3-n|&lt;epsilon.
    """
    high = 2 + abs(cube)
    low = -high
    while True:
        guess = (low + high) / 2.0
        err = abs(cube - guess ** 3)
        if err &lt; epsilon:
            return guess
        if guess ** 3 &gt; cube:
            high = guess
        else:
            low = guess


def main():
    """Read one number from command line and print its cube root."""
    from sys import argv

    try:
        cube = float(argv[1])
    except ValueError:
        exit("Usage: cuberoot n [n must be a number]")
    except IndexError:
        exit("Usage: cuberoot n")

    cr = cuberoot(cube)
    assert abs(cr ** 3 - cube) &lt; 0.0001  # verify the result
    print(cr)


if __name__ == "__main__":
    main()