Discuss / Python / 作业

作业

Topic source

咪咪

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

weight = float(input('输入你的体重'))

height = float(input('输入你的身高'))

bmi = weight / (height ** 2)

if bmi <= 18.5:

   print('过轻',bmi)

elif 18.5 < bmi <= 25:

   print('正常',bmi)

elif 25 < bmi <= 28:

   print('过重',bmi)

elif 28 < bmi <= 32:

   print('肥胖',bmi)

elif 32 < bmi:

   print('肥胖',bmi)

else:

    print('准备后事吧',bmi)


  • 1

Reply