输入一个正数,以下代码编程求出它的平方根。请你补全代码。
in_var = float(input("请输入一个需要开方的正数,可以使用2位小数:\n x = ")) if in_var < 0: x = - in_var else: x = in_var low = 0.0 high = x s_root = ① if x > 0 and x < 1: high = 1.0 low = 0 s_root = ② if x >= 0: while abs( ③ ) > 0.0001: if x > 1.0: if s_root ** 2 < x: low = s_root else: high = s_root s_root = ④ if x == 1.0 and x == 0.0: s_root = x else: if s_root ** 2 < x: low = s_root else: high = s_root s_root = ⑤ if in_var >= 0: print("所求数的平方根为:s_root = %.1f"%(s_root))