weight = int(input("enter your weight :")) height = float(input("enter your height :")) ans = float(weight/(height ** 2)) if(ans < 18.5): print("Underweight") elif (ans == 18.5 && ans < 25): print("Normal") elif (and == 25 && ans < 30): print("Overweight") elif (ans >= 30) print("Obesity")
5/24/2022 9:56:07 AM
RTB2 Answers
New AnswerRTB , -> check your code for correct indentation -> check for missing colon after 'elif: -> also check all conditiins like '... ans == 18.5...'. (comparison operator). read the task description carefully and follow it btw: -> we do not need parenthesis when using 'if' or 'elif' -> if you are going to use your code for code coach, no user prompt in input() function is accepted
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message