- 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
6 Respostas
+ 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.
+ 2
Please provide a link to your attempt and explain what you are struggling with
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")
0
And what are you struggling with/What is the problem?
0
This code in not giving right output
0
Hint: Try to print the value of BMI. Is it what you would expect?