Discuss / Python / 交作业

交作业

Topic source

吾王思佳

#1 Created at ... [Delete] [Delete and Lock User]

height = input('height(m):') weight = input('weight(kg):') a=float(height) b=int(weight)

bmi=b/a**2 print('bmi=','%.2f' % bmi) if bmi>32: print('过度肥胖') elif bmi<=32 and bmi>25: print('肥胖') elif bmi<=25 and bmi>18.5: print('正常') elif bmi<18.5: print('过轻')


  • 1

Reply