Discuss / Python / 热闹

热闹

Topic source

大女人TYR

#1 Created at ... [Delete] [Delete and Lock User]
height = 1.75weight = 80.5bmi=weight/height**2if bmi<=18:    print('bmi为:%f,过轻' %(bmi))elif bmi>=18.5 and bmi<=25:    print("bmi为:%f,正常" %(bmi))elif bmi>=25 and bmi<=28:    print("bmi为:%f,过重" %(bmi))elif bmi>=28 and bmi<=32:    print("bmi为:%f,肥胖" %(bmi))else:    print("bmi为:%f,严重肥胖" %(bmi))

  • 1

Reply