📜  奇偶python代码示例

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

代码示例6
num = int(input("Number: "))
mod = num % 2
if mod == 0:
    print(f"{num} is even")
else:
    print(f"{num} is odd")