0

# Help

#tu código va aquí weight=0 hight=0 while True: weight = int(input()) hight = float(input()) masa = weight / hight ** 2 if masa <= 18.5: print('Underweight') elif (masa > 18.5) and (masa <= 24.9): print('Normal') elif (masa >= 25) and (masa <= 29.9): print('OverWeight') elif (masa >= 30): print('Obesity') https://code.sololearn.com/cVXHohF1ZM7A/?ref=app https://code.sololearn.com/cVXHohF1ZM7A/?ref=app

17th Feb 2022, 10:35 PM
Jose Luis 0
Try this. It works BMI=0 weight=float(input()) #weight in Kg height=float(input()) #height in M BMI=weight/height**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")
19th Feb 2022, 3:25 PM
🎄🎆Echoed🎇✨️ + 1
Thats true thank you.
18th Feb 2022, 12:25 AM
Jose Luis 0
Jose Luis Why use a while loop? This challenge can be resolved by simply using if, elif & else conditions Testing your code shows that your while loop is looking for the next input, which causes an eof, End OfFile, error in Sololearn
17th Feb 2022, 11:48 PM
Rik Wittkopp 