BMI calculator for python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

BMI calculator for python

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 Using the formula weight/height**2 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, I was told to get normal I tried it like this weight= int(input()) height= float(input()) newh= height**2 formula=weight/newh print(formula)

16th Jul 2022, 1:49 PM
Taiwo
Taiwo - avatar
2 Answers
+ 4
Task is : Using the formula weight/height**2 Output: "Underweight" If Bmi is less than 18.5 "Normal" If more or equal to 18.5 and less than 25 "Overweight" If more or equal to 25 and less than 30 "Obesity" If 30 or more Not result of formula
16th Jul 2022, 2:44 PM
Jayakrishna 🇮🇳
0
Thanks I understood its not solved in the mathematical aspect
18th Jul 2022, 11:30 AM
Taiwo
Taiwo - avatar