+ 3

Hi guys.I wrote this program in pythons to calculate bmi but it just answer for underweight and obesity!can you help me please?

#your code goes here weight=float(input()) #weight is in kg height=float(input()) #height is in meter #weight and height can be float numbers bmi=(weight/(height*height)) print(bmi) if bmi<18.5: print("underweight") if bmi>=18.5 and bmi<25: print("normal") if bmi>=25 and bmi<30: print("overweight") if bmi>=30: print("obesity")

4th Oct 2021, 4:39 PM
Mahdieh Zarbazou
Mahdieh Zarbazou - avatar
2 Respuestas
+ 3
Hi Mahdieh! Generally, we're supposed to print the output as same as expected by developers in coding practices. For example, you can't print 'hello' if they required to print 'Hello' and so on. The main reason is that python is a case sensitive programming language. So, it can differentiate both outputs easily.
4th Oct 2021, 5:06 PM
Python Learner
Python Learner - avatar
+ 3
Thank you so much.I removed (print (bmi)) and change the first letters to upper case and finally it got fixed🤩
4th Oct 2021, 6:10 PM
Mahdieh Zarbazou
Mahdieh Zarbazou - avatar