Question: 
Write a function for computing square roots using the babylonian method.


Model's Code:
def babylonian_squareroot(n):
    if n < 0:
        raise ValueError("Cannot compute square root of negative number")
    if n == 0:
        return 0
    x = n
    y = (x + n / x) / 2
    while abs(x - y) > 1e-10:
        x = y
        y = (x + n / x) / 2
    return y



Sample Correct Code:
def babylonian_squareroot(number):
    if(number == 0):
        return 0;
    g = number/2.0;
    g2 = g + 1;
    while(g != g2):
        n = number/ g;
        g2 = g;
        g = (g + n)/2;
    return g;


Asserts:
assert babylonian_squareroot(10)==3.162277660168379
assert babylonian_squareroot(2)==1.414213562373095
assert babylonian_squareroot(9)==3.0


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 246 of 974: 177/246 (71.95121951219512%): success