You are an expert Python programmer, and here is your task: Write a function for computing square roots using the babylonian method. Your code should pass these tests:
assert math.isclose(babylonian_squareroot(10), 3.162277660168379, rel_tol=0.001) assert math.isclose(babylonian_squareroot(2), 1.414213562373095, rel_tol=0.001) assert math.isclose(babylonian_squareroot(9), 3.0, rel_tol=0.001)
Comments
0No comments yet.