【python简单题一道身体质量指数(BodyMassIndex,BMI)是根据人的体重和身高计算得出的一个数字,BMI对大多数人来说,是相当可靠的身体肥胖指标,其计算公式为:BMI=weight/high*2,其中体重单位为公】
<p>问题:【python简单题一道身体质量指数(BodyMassIndex,BMI)是根据人的体重和身高计算得出的一个数字,BMI对大多数人来说,是相当可靠的身体肥胖指标,其计算公式为:BMI=weight/high*2,其中体重单位为公】<p>答案:↓↓↓<p class="nav-title mt10" style="border-top:1px solid #ccc;padding-top: 10px;">宋百川的回答:<div class="content-b">网友采纳 #脚本: #!/usr/bin/env python weight=float(raw_input('please input your weight:')) high=float(raw_input('please input your high:')) print '{0:.2f}'.format(weight/(high**2)) #输出: please input your weight:80 please input your high:1.75 26.12
页:
[1]