📜  python代码示例中的素数

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

代码示例6
a=int(input('number:'))
if a % 2 ==0 and a / 2 <= 2:
    print('composite')
elif a % 3 == 0 and a/3 <= 2:
    print('composit')
elif a % 5 == 0 and a/5 <= 2 :
    print('composit')
elif a % 7 == 0 and a/7 <= 2:
    print('composit')
else:
    print('prime')
________________________________________________________________________________