0

Can any one explain what's wrong in this?

#your code goes here x=float(input("Enter your weight:")) y=float(input("/n Enter your height:")) bmi=x/(y**2) print(bmi) if bmi<18.5 : print("underweight") elif(bmi>=18.5 and bmi<25): print("Normal") elif(bmi>=25 and bmi<30): print("overweight") elif(bmi>30): print("obesity")

26th Sep 2021, 8:37 AM
Kaivalya Deshpande
1 Resposta
+ 5
Kaivalya Deshpande There are a few problems 1. Get rid of the prompts within your float(inputs()). Sololearn doesn't handle them well. 2. Notice how some of your outputs have capitals & some don't? Set your outputs to exactly match the requirements of the code. 3. Comment out, or delete the line: print(bmi) I am assuming it was there for testing purposes, but will cause the challenge to fail. Good luck
26th Sep 2021, 9:01 AM
Rik Wittkopp
Rik Wittkopp - avatar