can someone help me with this code,please | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 4
11th Oct 2022, 6:50 AM
Tony Singh
Tony Singh - avatar
13 Respuestas
+ 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
11th Oct 2022, 7:11 AM
Venkatesh
Venkatesh - avatar
+ 3
Could you please describe the issue you are experiencing and what result you are expecting?
11th Oct 2022, 6:54 AM
Chris Coder
Chris Coder - avatar
+ 3
he wants to take all five validation tests in a beginner python course assignment
11th Oct 2022, 7:03 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 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.
12th Oct 2022, 3:16 PM
David
+ 2
look carefully, you do not have the second line of the branch operator code (second condition)
11th Oct 2022, 7:08 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Tony Singh Which help?
11th Oct 2022, 9:33 AM
Emerson Prado
Emerson Prado - avatar
+ 1
thanks to Arun ,it worked 💪
11th Oct 2022, 10:49 AM
Tony Singh
Tony Singh - avatar
0
I need some serious help.
11th Oct 2022, 6:51 AM
Tony Singh
Tony Singh - avatar
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 .😊
11th Oct 2022, 12:21 PM
ABA X GAMER
ABA X GAMER - avatar
0
Tell me if you can see it because I don't know properly how to share
11th Oct 2022, 12:25 PM
ABA X GAMER
ABA X GAMER - avatar
0
Could you send me the codes of c++ program?
11th Oct 2022, 10:26 PM
محدثه نادربیگی
محدثه نادربیگی - avatar
0
Sir please tell me what have use in python coding
12th Oct 2022, 12:05 PM
Krishna Jiddi
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.
12th Oct 2022, 4:22 PM
Vive MX
Vive MX - avatar