Discuss / Python / 练习

练习

Topic source

东楚寒

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

a=input('请输入身高(m):') b=input('请输入体重(kg):') height=float(a) weight=float(b) bmi=weight/(height**2) if bmi<18.5: print('过轻') elif bmi<=25: print('正常') elif bmi<=28: print('过重') elif bmi<=32: print('肥胖') else: print('严重肥胖')

请问怎么运行程序呀?能请教一下吗?我为什么运行程序,输入身高enter,输入体重enter后,再按enter就突然什么都没有了呀?


  • 1

Reply