Advertisement
Jmeel14

Python Square Root Calculator (Non-negatives)

Jan 28th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 KB | None | 0 0
  1. def sqrt(num):
  2.     x = 1
  3.     y = 0
  4.     while y == 0:
  5.         if num / x == x:
  6.             y = 1
  7.             return x
  8.         else:
  9.             x = x + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement