Discuss / Python / 判断语句

判断语句

Topic source

Joeson同学

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

coding=utf-8

height = 1.75

h=input('Please input your height: ')

weight = 80.5

w=input('Please input your weight: ')

bmi = weight/pow(height,2)

bmi = w/pop(h,2)

if bmi>32: print('肥仔')
elif bmi>28: print('大肥') elif bmi>25: print('过重') elif bmi>18.5: print('pass') else: print('过轻')


  • 1

Reply