def test_improve_guess_2(): # this one is for a student who can handle extremely bad cases. # It CAN be done given the content we have covered already! n = 54 g = 7 res = improve_guess(g, n) assert abs(res - 7.3571) < epsilon
def test_improve_guess_2_dup(): # dup to increase weightage n = 54 g = 7 res = improve_guess(g, n) assert abs(res - 7.3571) < epsilon
def test_improve_guess(): n = 54 g = 7.0 # haven't discussed casting yet. So, need to send at least one float res = improve_guess(g, n) assert abs(res - 7.3571) < epsilon
def test_improve_guess_zero(): n = 1e-7 g = 0 res = improve_guess(g, n) assert abs(res - 5.000000005) < epsilon
def test_improve_guess(): n = 36 g = 4 assert abs(improve_guess(g, n) - 6.5) < epsilon