- 完全平方數開根號後是一個整數,非完全平方數開根號的話是一個非整數
- 開根號後取整,如果開根號後是整數的話就不會改變值的大小
- 取整後再平方,如果值和之前一樣,說明是完全平方數
import math
def check(n): #n:被判斷的數
a = int(math.sqrt(n))
return a * a == n
Computer graduation design Python+djangs freshman enrollment management system (source code + system + mysql database + Lw document)
項目介紹每年都有大量的新生需要報到,但是很多時候因為是第一次
Python - demandes de bibliothèques http tierces utilisant detail 5 (beautiful soup, Web crawler)
Six、Utiliser BeautifulSoup Ana