Bmi calculator please help me solve this with. Some explanation | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 1

Bmi calculator please help me solve this with. Some explanation

Tracking your BMI is a useful way of checking if you’re maintaining a healthy weight. It’s calculated using a person's weight and height, using this formula: weight / height² The resulting number indicates one of the following categories: Underweight = less than 18.5 Normal = more or equal to 18.5 and less than 25 Overweight = more or equal to 25 and less than 30 Obesity = 30 or more Let’s make finding out your BMI quicker and easier, by creating a program that takes a person's weight and height as input and outputs the corresponding BMI category. Sample Input 85 1.9 Sample Output Normal

22nd Apr 2022, 1:42 AM
Rammohan Sharma
6 Réponses
+ 2
Try searching the Q&A before posting a question to see if it has been asked before (it has) Did you try to solve it? If so, post your code so we can help. Generally, everything you need to know to solve the solution challenge is in the lessons leading up to the challenge. Google and Bing are good resources too.
22nd Apr 2022, 2:09 AM
Paul K Sadler
Paul K Sadler - avatar
+ 2
Please provide a link to your attempt and explain what you are struggling with
22nd Apr 2022, 9:06 AM
John Doe
0
Here it is what I done ... weight = float(input("")) height = float(input("")) BMI = weight / (height**height) if BMI < 18.5: print("Underweight") elif BMI >= 18.5 and BMI < 25: print("Normal") elif BMI >= 25 and BMI < 30: print("Overweight") elif BMI >= 30: print("Obesity")
25th Apr 2022, 4:32 PM
Rammohan Sharma
0
And what are you struggling with/What is the problem?
25th Apr 2022, 5:41 PM
John Doe
0
This code in not giving right output
26th Apr 2022, 7:45 AM
Rammohan Sharma
0
Hint: Try to print the value of BMI. Is it what you would expect?
27th Apr 2022, 4:55 PM
John Doe