0

Someone know what's the error please? Is the IMC practice

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

27th Jan 2022, 6:00 PM
Bluelover
Bluelover - avatar
5 Answers
+ 2
What happens if IMC is 24.9? Or 29.9?
27th Jan 2022, 7:04 PM
Paul
Paul - avatar
+ 1
What did you input and what was the error message you got? I tried your code and it worked.
27th Jan 2022, 6:46 PM
Mario Kampmeier
Mario Kampmeier - avatar
+ 1
peso=float (input()) #1 no space altura=float(input()) #2 IMC=peso/(altura**2) #3 if IMC<18.5: print("Underweight") if IMC >= 18.5 and IMC < 25: # to not praction parts use <25 print("Normal") if IMC >= 25 and IMC < 30: # print("Overweight") if IMC >= 30: print("Obesity") #try this, it shloud work Bluelover
27th Jan 2022, 7:05 PM
Jayakrishna šŸ‡®šŸ‡³
0
I didn't input anything because is a practice ,it said that there is an error in the answer 4 but I can't see it because I'm not premium
27th Jan 2022, 6:57 PM
Bluelover
Bluelover - avatar
0
I think is an error from the app because I've tried all :(
27th Jan 2022, 7:07 PM
Bluelover
Bluelover - avatar