使用二分法(Bisection Method)求平方根。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 def sqrtBI(x, epsilon): assert x>0,'X must be non-nagtive, not ' + str(x) assert epsilon >0,'epsilon must be postive, not ' + str(epsilon) low= 0 high= x guess= (low+