Skip to content
Code ReadingWhole Square Root
Break the Code

Whole Square Root

Write a number for which this function gives the wrong answer.
1def whole_root(n):
2 r = 0
3 while r * r < n:
4 r += 1
5 return r