+ 1
Help me to carecter this python code
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")
2 odpowiedzi
+ 6
RTB ,
-> 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