Discuss / Python / 交公粮

交公粮

Topic source

-- coding: utf-8 --

print('告诉我你的身高(CM)\n') h=input() h=float(h) h=h/100 print('掩面输入你的体重(KG)') w=input() w=float(w) BMI =(w/h/h) print('你的BMI为%.2f。' % BMI) if BMI < 18.5: print('你是个轻飘飘的家伙!') elif BMI > 18.5 and BMI <25: print('你是个正常的娃!') elif BMI == 25: print('站在了正常和过重的临界点了啊') elif BMI >25 and BMI <28: print ('那些描述过重的说的就是你') elif BMI == 28: print('过重之巅肥胖入门') elif BMI > 28 and BMI < 32: print('妥妥的肥胖人士') elif BMI == 32: print('介于肥胖和严重肥胖的神') else: print('严重肥胖的不解释')


  • 1

Reply