導航:首頁 > 編程語言 > 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輸入七天的體重相關的資料

熱點內容
一個數除以二的演算法 瀏覽:403
如何選擇php培訓機構 瀏覽:982
app被移除管理了怎麼弄 瀏覽:934
phpredis消息推送 瀏覽:803
剪貼板里怎麼加密碼 瀏覽:153
51單片機入門自學 瀏覽:548
如何看步數有同步伺服器 瀏覽:10
單片機掃描實驗代碼 瀏覽:721
惠州抖音app推廣平台怎麼引流 瀏覽:758
如何再網路設置裡面添加伺服器 瀏覽:191
陶瓷pdf 瀏覽:672
選股指標源碼最新 瀏覽:577
arm嵌入式linuxpdf 瀏覽:477
本田裂行的壓縮比 瀏覽:24
ps色彩調色命令 瀏覽:592
寬頻的伺服器地址怎麼看 瀏覽:423
vb如何給文件加密 瀏覽:215
python柱狀圖顯示前十 瀏覽:63
文件包加密是什麼意思 瀏覽:500
南方加密狗多少錢一隻 瀏覽:839