Discuss / Python / 打卡

打卡

Topic source

# -*- coding: utf-8 -*-

height =input('你的身高:')

height = float(height)

weight =input('你的体重:')

weight = float(weight)

bim = weight/height**2

if bim<=18.5:

 print('过轻')

elif bim<=25:

 print('正常')

elif bim<=28:

 print('过重')

elif bim<=32:

 print('肥胖')

else:

 print('严重肥胖')


  • 1

Reply