Watch 2 Star 2 Fork 0

RCPI / pi4bPythonMulanPSL-2.0

Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
这里是针对树莓派4B的远程控制类python程序代码 spread retract

https://gitee.com/rcpi/pi4b

Clone or download
BMItest.py 550 Bytes
Copy Edit Web IDE Raw Blame History
RCPI authored 2020-03-28 03:26 . 体脂指数计算
#!/usr/bin/python
# -*- coding:utf-8 -*-
import os
i = os.system("cls")
xmhi = float(input('请输入身高(米):'))
xmtz = float(input('请输入体重(公斤):'))
bmi = round((xmtz/(xmhi*xmhi)), 2) # 取小数点后两位
if bmi > 32:
print('BMI指数为', bmi, '严重肥胖')
elif bmi >= 28:
print('BMI指数为', bmi, '肥胖')
elif bmi >= 25:
print('BMI指数为', bmi, '过重')
elif bmi >= 18.5:
print('BMI指数为', bmi, '正常')
elif bmi < 18.5:
print('BMI指数为', bmi, '过轻')
else:
pass

Comment ( 0 )

Sign in for post a comment

Python
1
https://gitee.com/rcpi/pi4b.git
git@gitee.com:rcpi/pi4b.git
rcpi
pi4b
pi4b
master

Help Search

205735 778617b6 1899542 205747 347fc4a1 1899542