Computer Science, asked by rishabchandrago2061, 1 year ago

Write a program to calculate bmi in python using lists

Answers

Answered by nitindhyani1234
1
#Python program to illustrate
# how to calculate BMIdef BMI(height, weight):
bmi = weight/(height**2) return bmi
# Driver codeheight = 1.79832weight = 70
# calling the BMI functionbmi = BMI(height, weight)print("The BMI is", format(bmi), "so ", end='') # Conditions to find out BMI categoryif (bmi < 18.5): print("underweight") elif ( bmi >= 18.5 and bmi < 24.9): print("Healthy") elif ( bmi >= 24.9 and bmi < 30): print("overweight") elif ( bmi >=30): print("Suffering from Obesity")
Answered by fiercespartan
2

Hey there!!

Here is the code to find the body mass index of a person:

weight = int(input('Enter your weight in KG:'))

height = int(input('Enter your height in meters:'))

print('Your BMI is:',weight/(height**2))

Hope my answer helps! :)

Similar questions