0
What’s wrong with my code?
I’m attempting to solve the BMI calculator challenge, what is wrong with my code? weight = int(input()) height = float(input()) if weight //height * height < 18.5: print("Underweight") if (weight //height * height => 18.5) and (weight//height * height < 25 ): print("Normal")
3 Respuestas
+ 2
Where are other conditions for Obesity and Overweight?
0
Awesome
One thing that you need to have in mind is to write clear the code so other coder
can be able to read what you write. this rules is one of the most important that we learn in Python as beginner.
I will suggest you to use: elif to solve the problem. so write likes this
bmi = weight / (height ** 2)
if bmi < 18.5:
print('Underweight')
elif bmi >= 18.5 and bmi < 25:
print('Normal')
0
Simba, im still working on them
JRamonsMH, thank you for advice