Search your topic here

Python Program to find the square root of a number by Newton’s Method.

To write a Python Program to find the square root of a number by Newton’s Method. 

num=int(input("Enter a number:"))
newtonSquareroot= 0.5*((0.5*num)+num/(0.5*num)) 
print (newtonSquareroot) 

OUTPUT:
Enter a number:2
1.5

LEAVE A REPLY