Getting Multiple Inputs and checking if they are Perfect squares or not without using math

前端 未结 0 940
面向向阳花
面向向阳花 2021-02-01 15:30
def isPerfectSquare(n) :
 
    i = 1
    while(i * i<= n):
        if ((n % i == 0) and (n / i == i)):
            return True
        i = i + 1
    return False

lst         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题