Discuss / Python / 试试BMI

试试BMI

Topic source

en归隐

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

print('很多人以为直到失去你才知道拥有过什么,而事实上,你一直知道你拥有什么,只是你以为你永远不会失去\n'*2)

s1=input('输入你的身高(m):') s2=input('输入你的体重(kg):') height=float(s1) weight=float(s2) bmi=weight/(height**2) if bmi<18.5: print ('过轻') elif 18.5<=bmi<25: print('正常') elif 25<=bmi<28: print('过重') elif 28<=bmi<32: print('过胖') else: print('严重肥胖')


  • 1

Reply