h=float(input('请输入你的身高')) w=float(input('请输入你的体重')) b=float(w/h/h) if b<18.5: print('too light') elif b<25: print('normal') elif b<28: print('too weight') elif b<32: print('fat') else: print('so fat')
你这样写应该所有的结果都是 too light,如果不想写准确范围就从>32 开始写啊
??打扰了,我看错了。。。。
Sign in to make a reply
JC辰01227
h=float(input('请输入你的身高')) w=float(input('请输入你的体重')) b=float(w/h/h) if b<18.5: print('too light') elif b<25: print('normal') elif b<28: print('too weight') elif b<32: print('fat') else: print('so fat')