📜  找到素数的有效方法 inpython 代码示例

📅  最后修改于: 2022-03-11 14:45:18.933000             🧑  作者: Mango

代码示例1
num = 13
if num > 1:
for i in range(2, num//2):
if (num % i) == 0:
print(num, "is not a prime number")
break
else:
print(num, "is a prime number")
else:
print(num, "is not a prime number")