python

QLxie2023 发表于 2年前 · 关联问题 体型判断

h,w = map(float,input().split())
t = w/h**2
if t<18:
print('underweight')
elif 18<=t<25:
print('normal')
elif 25<=t<27:
print('overweight')
else:
print('obese')

JYM070605 发表于 3天前

h,w=map(float,input().split()) t=w/(h**2) if t<18: print("underweight") elif 18<=t<=25: print("normal") else: print("obese")