+ 1
BMI calculator not working please help
#your code goes here wieght = int(input()) hieght = float(input()) reslut = wieght / float ( hieght ** 2) if (reslut < 18.5): print ("Underweight") elif (reslut >= 18.5) and (wieght < 25.0): print ("Normal") elif (reslut >= 25.0) and (wieght < 30.0): print ("Overweight") elif (reslut > 30.0): print ("Obesity")
8 Answers
+ 1
check your elif conditions again and what you're comparing them to on one side of the "and" versus the other side.
+ 1
Simba no needs of higher precedence as wieght*wieght is wraped inside parenthesis...
0
first 2 test passed and other three failed please help
0
Nirmal did you have solved it now?
if not, you must check for 'reslut' less than something rather than 'wieght' ^^
0
visph no I didn't
0
Nirmal you didn't what?
0
if you didn't yet solve your problem, follow my first post advice ;)
0
visph oh my god thanks man I am being a absolute dumm thanks . I just forgot that result variable đ