1def perfect_squares(minimum, maximum) :
2 # get first number
3 number = ceil(sqrt(minimum));
4
5 # get fisrt number's square
6 n2 = number * number;
7
8 # get next
9 number = (number * 2) + 1;
10
11 while ((n2 >= minimum and n2 <= maximum)) :
12
13 # print perfect square
14 print(n2, end= " ");
15
16 # find next perfect square
17 n2 = n2 + number;
18
19 # next odd number to be added
20 number += 2;