python偶数怎么表达

更新时间:02-02 综合 由 沉苍 分享

新建PYTHON文档,输入:n = float(input(“input a num: ”));if n % 2 == 0:;print(“even”);elif n % 2 != 0:;print(“odd”)。如果输入的数字是偶数,输出的文字为:even。

声明:关于《python偶数怎么表达》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/all/15_487607.html