Discuss / Python / 交作业

交作业

Topic source

height = float(input('please enter your height:')) weight = float(input('please enter your weight:')) BMI = weight/(height**2) print ('BMI指数为:%.2f' %BMI) if BMI<18.5: print('过轻') elif BMI<25: print('正常') elif BMI<32: print('肥胖') else: print('严重肥胖')


  • 1

Reply