Discuss / Python / 交作业啦~

交作业啦~

Topic source

Wizology

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

-- coding: utf-8 --

Height= float(input('Input your Height: ')) Weight= float(input('Input your Height: '))

BMI=float(Weight/Height**2)

if BMI< 18.5: print('您太瘦啦!快多吃点肉!', BMI) if 18.5<BMI<25: print('恭喜您!继续保持吧~', BMI) if 25<BMI<28: print('要注意体重了哦~', BMI) if 28<BMI<32: print('肚子上的肉能绕地球一圈了吧。。。', BMI) if BMI>32: print('OMG...我选择死亡!', BMI)

花很慢

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

你写错啦。第二行代码应该是Weight,而不是Height,第三行也有问题


  • 1

Reply