日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

python偶數(shù)怎么表達(dá) python判斷偶數(shù)奇數(shù)

在python編譯器中,新建一個(gè)空白的PYTHON文檔;輸入:
n = float(input("Please input a number: "))
if n % 2 == 0:
print("This is an even")
elif n % 2 != 0:
print("This is an odd")
如果輸入的數(shù)字是偶數(shù),輸出的文字為“This is an even” 。如果輸入的數(shù)字是奇數(shù),輸出的文字為“This is an odd” 。

python偶數(shù)怎么表達(dá) python判斷偶數(shù)奇數(shù)


python怎么判斷奇數(shù)偶數(shù)
1、首先打開JUPYTER NOTEBOOK,新建一個(gè)空白的PYTHON文檔 。也可以用其它編譯器的 。
python偶數(shù)怎么表達(dá) python判斷偶數(shù)奇數(shù)


2、輸入以下內(nèi)容:
num1 = int(input("Please input a number: "))
num2 = int(input("Please input a number: "))
if num1 % num2 == 0:
print("This is OK.")
elif num1 % num2 != 0:
print("This is NOT OK")
【python偶數(shù)怎么表達(dá) python判斷偶數(shù)奇數(shù)】如果輸入的數(shù)字為偶數(shù),文檔就會(huì)返回文字"This is OK”;如果輸入的數(shù)字是奇數(shù),文檔就會(huì)返回文字"This is NOT OK” 。

    推薦閱讀