6 Answers
New Answerw = float(input("Enter Weight ")) h = float(input("Enter Height ")) b = w / h**2 if b < 18.5: print("Underweight") elif (b >= 18.5 and b < 25.0): print("Normal") elif (b >= 25 and b < 30): print("Overweight") else: print("Obesity")
8/6/2021 6:11:26 AM
Arshad Ali6 Answers
New AnswerHi Arshad! Generally, we're supposed to print output as same as expected by developers in coding practices. For example, you can't print 'hello world' if they required to print only 'hello'. The main reason is that python is a case sensitive programming language. So, it can differentiate both outputs easily. Likewise, prompt messages aren't accepted in Sololearn practices since they're not in expected output. So, you can remove your prompt messages inside input() and check it again.
Python Learner , thanks. It worked. So basically, I was providing unwanted output through the prompt messages.
I wrote this code for End of Module project (Python for beginner). It is not working as expected there, but working fine otherwise.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message