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

16th Jun 2021, 11:44 AM
Александр
7 Respostas
+ 11
https://www.sololearn.com/Discuss/2759594/?ref=app https://www.sololearn.com/Discuss/2748154/?ref=app
16th Jun 2021, 12:15 PM
Simba
Simba - avatar
+ 1
Thanks guys!))))
16th Jun 2021, 1:19 PM
Александр
16th Jun 2021, 11:54 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
4 test of this application, where you need to create a BMI calculator, failed anyway ..
16th Jun 2021, 11:59 AM
Александр
0
Edited your code a little bit: https://code.sololearn.com/ca25A20A23A4
16th Jun 2021, 12:15 PM
The future is now thanks to science
The future is now thanks to science - avatar
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..
16th Jun 2021, 12:16 PM
Jayakrishna 🇮🇳
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")
16th Jun 2021, 12:33 PM
Debeswar Ray
Debeswar Ray - avatar