Discuss / Python / 可行

可行

Topic source

Ashen One

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

length = float(input('请输入小明的身高:'))

weight = float(input('请输入小明的体重:'))

BMI = weight/length**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