Wite a pyhon program to find the square root of a number by newtons method
Answers
Answered by
0
Hi this is the program, which i feel should work
def nsqrt(n, m):
app = 0.5 * n
for i in range(m):
b = 0.5 * (app + n/app)
app = b
return b
print(nsqrt(10, 2))
print(nsqrt(10, 6))
print(nsqrt(10, 7))
jay1001:
Also, pls check for the indentation
Similar questions