Discuss / Python / 交作业

交作业

Topic source

Myron_W

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

-- coding: utf-8 --

height = 1.75 weight = 80.5 bmi = weight/(height*height) print('小明的bmi为%.2f' % bmi) if bmi>32: print('severe obesity') elif bmi>28: print('fat') elif bmi>25: print('overweight') elif bmi>18.5: print('normal') else: print('light')


  • 1

Reply