+ 4
can someone help me with this code,please
13 Answers
+ 1
Tony,
Your code has mistakes in ranges ...
Change it as,
If BMI<18.5
elif BMI>=18.5 and BMI<25
elif BMI>=25 and BMI<30
it will work..try
+ 3
Could you please describe the issue you are experiencing and what result you are expecting?
+ 3
he wants to take all five validation tests in a beginner python course assignment
+ 3
Tony since you are using CM² for hight, you have to multiply the end my 10000. I played with it and come up with this
num1="weight in kg"
num2="height in cm"
num1,num2=input("Enter two numbers:").split( )
print(num1,num2)
bmi=float(num1)/float(num2)**2*10000
print(bmi)
if(bmi<=18.5):
print("Underweight")
elif(bmi<=18.5)and(bmi<=25.0):
print("Normal")
elif(bmi>=25.0)and(bmi<=30.0):
print("Overweight")
else:
print("Obesity")
it seemed to work after.
+ 2
look carefully, you do not have the second line of the branch operator code (second condition)
+ 1
Tony Singh Which help?
+ 1
thanks to Arun ,it worked 💪
0
I need some serious help.
0
Bro see your corrected programme through my profile I have posted it there for you . Follow me so you can easily get help from me in future .😊
0
Tell me if you can see it because I don't know properly how to share
0
Could you send me the codes of c++ program?
0
Sir please tell me what have use in python coding
0
weight =int(input());
height =float(input());
x = weight/float(height*height);
if x < 18.5:
print('Underweight')
if x>=18.5 and x<25:
print("Normal")
if x >= 25 and x < 30:
print('Overweight')
if x >= 30:
print('Obesity')
This is a solution of this.