Discuss / Python / 1

凉风

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

h = input('输入你的身高m:')

w = input('输入你的体重kg:')

height = float(h)

weight = float(w)

bmi = weight/(height**2)

if bmi > 32:

    print('肥胖')

elif bmi >= 28 :

    print('肥胖')

elif bmi >= 25 :

    print('过重')

elif bmi >= 18.5 :

    print('正常')

elif bmi < 18.5 :

    print('过轻')

print(bmi)


  • 1

Reply