導航:首頁 > 編程語言 > python輸入七天的體重

python輸入七天的體重

發布時間:2022-05-15 20:36:29

python bmi公式怎麼用

weight=int(raw_input("請輸入體重(千克):"))
height=int(raw_input("請輸入身高(米):"))
BMI=weight/(height*height)
print "BMI=",BMI

if BMI<19:
print「輕體重"
elif BMI>=19 and BMI<25:
print"健康身體"
elif BMI>=25 and BMI<28:
print"超重「
else:
print"肥胖」
raw_input("press any key to quit.")

❷ 怎麼用python算bmi 簡單編程 在線等

weight=int(raw_input("請輸入體重(千克):"))
height=int(raw_input("請輸入身高(米):"))
BMI=weight/(height*height)
print "BMI=",BMI

if BMI<19:
print「輕體重"
elif BMI>=19 and BMI<25:
print"健康身體"
elif BMI>=25 and BMI<28:
print"超重「
else:
print"肥胖」
raw_input("press any key to quit.")

❸ 怎樣用python計算bmi

weight=int(raw_input("請輸入體重(千克):"))

height=int(raw_input("請輸入身高(米):"))

BMI=weight/(height*height)

print"BMI=",BMIifBMI<19:

print「輕體重"

elifBMI>=19andBMI<25:

print"健康身體"

elifBMI>=25andBMI<28:

print"超重「

else:

print"肥胖」

raw_input("pressanykeytoquit.")

❹ Python讓用戶輸入自己的體重,以克為單位轉化為千克,但是現在我不知道怎麼讓用戶輸入的代碼

defconvert_kg(g):
returnstr(g/1000.0)+'kg'
print(convert_kg(int(input('請輸入體重(克):'))))

python3版本。python2的話中文要用unicode。想學好python可以關注我的課程,謝謝

❺ python重量計算編程

x1=50
y1 = x1 + 0.5*10
y2 = y1 * 0.165

閱讀全文

與python輸入七天的體重相關的資料

熱點內容
java聊天窗口 瀏覽:976
單片機控制陣列led燈 瀏覽:577
白鹿用的什麼APP修圖 瀏覽:499
阿里雲輕量應用伺服器ssh無法連接 瀏覽:794
員工福利系統源碼 瀏覽:982
數據加密如何設置 瀏覽:570
php取余運算 瀏覽:153
php如何壓縮圖片大小 瀏覽:137
編程三階教程 瀏覽:983
pdf顏色查看 瀏覽:469
怎麼用指令停用命令方塊java 瀏覽:406
滑鼠命令行 瀏覽:567
如何朗讀pdf 瀏覽:746
壓縮機啟動後繼電器發燙 瀏覽:405
小學編程項目學習 瀏覽:557
net編譯運行原理 瀏覽:786
加密電腦的文件拷出來打不開 瀏覽:366
可達性演算法根 瀏覽:208
ibm的伺服器怎麼安裝系統 瀏覽:492
pdftomobi在線 瀏覽:797