height = float(input('please enter your height:(m)'))
weight = float(input('please enter your weight:(kg)'))
bmi = weight/(height*height)
if bmi < 18.5:
print('hello your is bmi:%.2f ,bmi过轻'%(bmi))
elif bmi <= 25:
print('hello your is bmi:%.2f ,bmi正常'%(bmi))
elif bmi <= 28:
print('hello your is bmi:%.2f ,bmi过重'%(bmi))
elif bmi <= 32:
print('hello your is bmi:%.2f ,bmi肥胖'%(bmi))
elif bmi > 32:
print('hello your is bmi:%.2f ,bmi'%(bmi))
print('your height is:%.2fm\nweight is:%.1fkg\nbmi is:%.1fbmi'%(height,weight,bmi))
Sign in to make a reply
Xxiangq
height = float(input('please enter your height:(m)'))
weight = float(input('please enter your weight:(kg)'))
bmi = weight/(height*height)
if bmi < 18.5:
print('hello your is bmi:%.2f ,bmi过轻'%(bmi))
elif bmi <= 25:
print('hello your is bmi:%.2f ,bmi正常'%(bmi))
elif bmi <= 28:
print('hello your is bmi:%.2f ,bmi过重'%(bmi))
elif bmi <= 32:
print('hello your is bmi:%.2f ,bmi肥胖'%(bmi))
elif bmi > 32:
print('hello your is bmi:%.2f ,bmi'%(bmi))
print('your height is:%.2fm\nweight is:%.1fkg\nbmi is:%.1fbmi'%(height,weight,bmi))