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

熱點內容
程序員被噴了怎麼辦 瀏覽:707
android消息數 瀏覽:261
為什麼在伺服器里輸不了指令 瀏覽:28
程序員那麼可愛前女友劇情介紹 瀏覽:101
centosjava環境變數配置 瀏覽:552
伺服器主板被鎖如何恢復 瀏覽:129
xpc語言編程軟體 瀏覽:820
光遇安卓怎麼解限制 瀏覽:300
元氣騎士老版源碼 瀏覽:102
助眠解壓音頻小姐姐口腔音 瀏覽:232
sql加密身份證號解碼 瀏覽:162
解壓玩法視頻 瀏覽:465
蘋果xls如何設置加密 瀏覽:208
湖北廣電dns的伺服器地址是多少 瀏覽:529
php獲取原始數據 瀏覽:250
pic單片機如何編程 瀏覽:895
javabyte寫文件 瀏覽:325
java獲取類包名 瀏覽:894
ftp命令編碼格式 瀏覽:300
程序員那麼可愛陸離穿正裝 瀏覽:171