8 lines
148 B
Python
8 lines
148 B
Python
|
x = float(input('Please input the number to calculate the square root of! '))
|
||
|
a = 2
|
||
|
|
||
|
while abs((a - (x / a))) > 1:
|
||
|
a = (a + (x / a)) / 2
|
||
|
|
||
|
print(a)
|