0
What's wrong with my code??? Pls help me in figure it out .
weight=int(input()) height= float(input ()) BMI=(weight) /(height )*(height ) 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")
2 Réponses
+ 2
Weight cannot be int so cast with float
BMI = weight / (height * height)
https://www.sololearn.com/discuss/2687547/?ref=app
https://www.sololearn.com/discuss/2686011/?ref=app
https://www.sololearn.com/discuss/3043453/?ref=app
https://www.sololearn.com/discuss/2686226/?ref=app
https://www.sololearn.com/discuss/3056709/?ref=app
0
Thanks...(height*height) it works