nokizorque

Untitled

Aug 11th, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. def newton_sqrt(k):
  2.   x = k / 2
  3.   for x in range(10):
  4.     x = x - (((x ** 2) - k) / (2 * x))
  5.    
  6. newton_sqrt(2)
Advertisement
Add Comment
Please, Sign In to add comment