¿Why this IMC calculation doesn't work?! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

¿Why this IMC calculation doesn't work?!

peso = float(input()) altura = float(input()) if (peso/altura**2)< 18.5: print ("Underweight") if (peso/altura**2)> 18.5 and (peso/altura**2) < 24.9: print ("Normal") if (peso/altura**2)> 25 and (peso/altura**2)< 29.9: print ("Overweight") else (peso/altura**2)> 30: print ("Obesity")

23rd Apr 2022, 2:05 PM
franco badano
franco badano - avatar
2 Answers
0
Still doesn't work
23rd Apr 2022, 2:17 PM
franco badano
franco badano - avatar
0
Thanks I change the ">" for ">=" like you tell me, and I delete the final "else" and worked.
23rd Apr 2022, 2:26 PM
franco badano
franco badano - avatar