Esempio n. 1
0
 def test_find_next_square(self):
     self.assertEqual(36, find_next_square(25))
     self.assertEqual(1, find_next_square(0))
 def test_find_next_square(self):
     self.assertEqual(36, find_next_square(25))
     self.assertEqual(1, find_next_square(0))
Esempio n. 3
0
"""
This program will look for the next perfect square.
Check the argument to see if it is a perfect square itself, if it is not then return -1 otherwise look for the next perfect square
for instance if you pass 121 then the script should return the next perfect square which is 144.
"""

from algorithms.maths import find_next_square, find_next_square2

print(find_next_square(121))

print(find_next_square2(144))