0
HELP PLEASE!!
I’m new to coding and tryna figure out what I did wrong with this BMI calculator but I can’t seem to figure it out! https://code.sololearn.com/cVp8UJSNelfB/?ref=app
4 Respuestas
+ 4
Hi! why did you choose an operator "or" in your program? you need two conditions to be met at the same time. think about it
+ 1
Yaroslav Vernigora omg i feel so dumb now🤦🏽♂️🤦🏽♂️🤦🏽♂️ i appreciate the help!!
+ 1
😁😉👍
0
Trae Monte, you may reduce the logic further. By definition if bmi < 18.5 is false, then bmi >= 18.5 must be true. Why test bmi >= 18.5 when you know it is true?
if bmi < 18.5:
...
elif bmi < 25:
...
elif bmi < 30:
...
else:
....