Discuss / Python / 日常

日常

Topic source

height = float(input('enter your height:')) weight = float(input('enter your weight:')) BMI = weight/(height*height) if BMI < 18.5: print('your BMI is','%.1f'%BMI,'\ntoo light') elif BMI >= 18.5 and BMI <= 25: print('your BMI is','%.1f'%BMI,'\ngood') elif BMI >25 and BMI <= 28: print('your BMI is','%.1f'%BMI,'\nnot good') elif BMI >28 and BMI <= 32: print('your BMI is','%.1f'%BMI,'\nfat') else: print('your BMI is','%.1f'%BMI,'\ntoo fat')


  • 1

Reply