body mass index (solved) | Sololearn: Learn to code for FREE!

0

body mass index (solved)

help please, what's wrong? my code fails 1 test, I don’t understand what can be added. I have already changed the inequality signs. https://code.sololearn.com/cI2lv07PJ825/?ref=app

6/16/2021 11:44:52 AM

Александр

7 Answers

New Answer

+11

https://www.sololearn.com/Discuss/2759594/?ref=app https://www.sololearn.com/Discuss/2748154/?ref=app

+1

Thanks guys!))))

0

https://code.sololearn.com/chV1YaLvOQ45/?ref=app

0

4 test of this application, where you need to create a BMI calculator, failed anyway ..

0

Edited your code a little bit: https://code.sololearn.com/ca25A20A23A4

0

#check your if conditions 3rd ,4th. ves = float (input()) rost = float (input()) imt = ves/(rost**2) if imt < 18.5: print ('Underweight') elif imt >= 18.5 and imt <= 24.9: print ('Normal') elif imt >=25 and imt <= 29.9: #Overweight = 25 - 29.9 print ('Overweight') elif imt >=30 : #Obesity = 30 and higher print ('Obesity') #if this not then use <25 instead of 24.9 and <30 instead of <=29.9 in 2nd and 3rd conditions..

0

bmi =float(input())/(float(input())**2) if bmi<18.5: print ("Underweight") elif bmi>=18.5 and bmi<25: print ("Normal") elif bmi>=25 and bmi<30: print ("Overweight") else: print ("Obesity")