Pythonの練習
#coding: UTF-8 import math def isPrime(num): for i in range(2, int(math.sqrt(num)) + 1): if(num % i == 0): return False; return True; for i in range(2, 20): print(i, " : ", isPrime(i))