stuck on BMI calc | Sololearn: Learn to code for FREE!


stuck on BMI calc

I can't seem to understand why my bmi calc isn't working. it prints out the correct word answer but then also the numbers and i cant work out why. if someone could help me understand this that would be much appreciated here is my code 'BMI calculator' w = float(input()) h = float(input()) coderino = w/h**2 if(coderino < 18.5) : print("Underweight") elif(coderino<25): print("Normal") elif(coderino<30): print("Overweight") elif(coderino>=30): print("Obesity") print(coderino) so if the input was w=52 h=1.85 the output is Underweight 15.193571950328705 because the output also contains a number i cannot pass the module project

1/23/2022 4:45:36 PM


2 Answers

New Answer


It's not necessary to print the value of coderino. You just have to print the variables that are provided by Sololearn. #print(coderino)


I did understand your Question Use // to get Floor division like , w//h**2 which gives Right answer