Discuss / Python / 不一定最好,但很容易懂

不一定最好,但很容易懂

Topic source

飞页快刀

#1 Created at ... [Delete] [Delete and Lock User]
height = 1.75weight = 80.5BMI=weight/(height**2)print('Your BMI is {0:.2f} '.format(BMI))if BMI < 18.5:    print('过轻')elif BMI <= 25:    print('正常')elif  BMI <= 28:    print('过重')elif BMI <= 32:    print('肥胖')elif BMI > 32:    print('严重肥胖')

飞页快刀

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

height = 1.75

weight = 80.5

BMI=weight/(height**2)

print('Your BMI is {0:.2f} '.format(BMI))

if BMI < 18.5:

    print('过轻')

elif BMI <= 25:

    print('正常')

elif  BMI <= 28:

    print('过重')

elif BMI <= 32:

    print('肥胖')

elif BMI > 32:

    print('严重肥胖')

  File "tiaojian.py", line 11

    \xa0 \xa0 print('过轻')

这是怎么回事

@疯狂的小鱼1996

编码声明了吗?确认是python3执行的吗


  • 1

Reply