Discuss / Python / 自己写的和参考其他人的总结

自己写的和参考其他人的总结

Topic source

name=input("请输入姓名:") height=float((input("请输入身高【M】:"))) weight=float((input("请输入体重【KG】:"))) BMI= weight/(height*height) print ("%s的BMI为:%.2f"%(name,BMI)) if BMI < 18.5: print ('过轻') elif BMI >=18.5 and BMI <25: print ('正常') elif BMI >=25 and BMI < 28: print ('过重') elif BMI>=28 and BMI<32: print ('肥胖') elif 32< BMI: print ('严重肥胖')

写的不错

wwbcww

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

很好的呀

lsl787878

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

请教下:有必要用三个括号么?


  • 1

Reply