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

熱點內容
php100張恩民視頻 瀏覽:640
安卓手機復制門禁卡加密 瀏覽:754
有哪些程序員特有的技能 瀏覽:399
痞幼資源包解壓密碼 瀏覽:699
pdf版本的ppt 瀏覽:176
網站伺服器地址在哪裡 瀏覽:715
python發行版常用包 瀏覽:212
nginx無法解析php 瀏覽:829
單片機編程基礎語言 瀏覽:308
私有雲伺服器怎麼設置 瀏覽:957
程序員的晚上生活 瀏覽:585
visualc的編譯鍵不見了 瀏覽:856
51單片機畢業設計論文 瀏覽:666
3doutline怎麼擴展命令 瀏覽:861
程序員生活費200 瀏覽:339
方舟編譯器與小米 瀏覽:184
佳明app訓練怎麼用 瀏覽:989
如何查看data有沒有加密 瀏覽:502
新福克斯壓縮比發動機 瀏覽:1000
斐波那契回調演算法公式 瀏覽:505