Someone help meh to solve this question 😑 | Sololearn: Learn to code for FREE!

+1

Someone help meh to solve this question 😑

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.

1/27/2022 7:21:02 PM

Hello :3

14 Answers

New Answer

0

Weight = float(input()) Height = float(input()) BMI = Weight/(Height**2) 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

Hello :3 Where's your try??

0

ㅤㅤㅤ maybe he could be a beginner who is struggling to wrtie code to an basic question . Yeah I might have shared him the solution instead of encouraging him to try the question on his own. But what i taught was he could refer to my solution and actually learn from it. We can’t always follow the norms you know.

0

hamishhr Giving someone direct solutions is not right as they will not learn anything but just ask for it again and again, so do you think it's good?That the asker won't learn anything, won't practice anything and just ask for the solutions? edit]: if he/she is struggling then he/she should attach the code here not ask for direct solutions

0

Hello :3 but also try to learn amd solve the problems.

0

ㅤㅤㅤ i don’t know how to call you . But lemme just name you as invisble unicode character user. Yeah you are correct . But i hope he will learn to solve the question on his own.

0

hamishhr we need to use continue operation instead of elif

0

ㅤㅤㅤ I,try many time but didn't succeed but I forgor to save my code😂

0

Yulia not worked

0

Om Sachin Wagh woah u got it man☺️ thanks

0

You are welcome.

0

My code is correct, maybe the problem is that I output additional data, if this is sololearn task then an error could occur.

-1

weigth = float(input("Enter weight: ")) height = float(input("\nEnter height(m): \n")) bmi = weigth/(height ** 2) a = round(bmi, 2) print(a) 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")

-3

height = float(input("Enter your height in cm: ")) weight = float(input("Enter your weight in kg: ")) BMI = weight / (height/100)**2 if BMI <= 18.5: print("Underweight.") elif BMI <= 18.5 and BMI < 25: print("You are healthy.") elif BMI >= 25 and BMI <30: print("Overweight") else: print("Obesity")