Discuss / Python / 迟来的作业,漏了补交

迟来的作业,漏了补交

Topic source

def ceshi(height,weight): height = 1.75 weight = 80.5 bmi=weight/((height)**2) print ('身高为%.2f米,体重为%d公斤'%(height,weight)) print ('BMI指数为%f'%(bmi)) if bmi<18.5: print ('过轻') elif bmi<=25: print ('正常') elif bmi<=28: print ('过重') elif bmi<=32: print ('肥胖') elif bmi>32: print ('严重肥胖') return bmi

ceshi(height,weight)


  • 1

Reply