Discuss / Python / 作业

作业

Topic source

Cuber陈

#1 Created at ... [Delete] [Delete and Lock User]

print('欢迎来到BMI测试') a=input('请输入你的身高(m):') b=input('请输入你的体重(kg):') h=float(a) w=float(b) s=w/h/h if s<=0: print('数据错误') elif s<18.5: print('体重过轻') elif s<25: print('正常') elif s<28: print('过重') elif s<32: print('肥胖') else: print('严重肥胖')


  • 1

Reply