"Program to Find the Square Root of a Number using Newtons Method"
print ("Program to find the Square Root of a Number using Newton Method")
num=int(input ("Enter the Number: "))
itr=0
i=1
while itr < num:
itr=i*i
i=i+1
r=i-2
v1=1/2
v2=num/r
v3=v1*(v2+r)
v3=round(v3,1)
print ("The Square Root of " , num , "is :", v3)
print ("Program to find the Square Root of a Number using Newton Method")
num=int(input ("Enter the Number: "))
itr=0
i=1
while itr < num:
itr=i*i
i=i+1
r=i-2
v1=1/2
v2=num/r
v3=v1*(v2+r)
v3=round(v3,1)
print ("The Square Root of " , num , "is :", v3)
No comments:
Post a Comment