top of page
Program #003
Calculate BMI of a Person
# Write a program to calculate body mass index (BMI)
# Formula : BMI = Weight (in kg) / Height2 (in meter)
weight = float(input (“Enter weight of a person in kg “))
height = float(input (“Enter height of a person in m “))
bmi = weight / height**2
print(“ PERSON DETAILS”)
print(“ Height : “, height)
print(“ Weight : “, weight)
print(“ BMI (Body Mass Index : “, bmi)
# Output:-
Enter weight of a person in kg 87
Enter height of a person in m 1.75
PERSON DETAILS
Height : 1.75
Weight : 87.0
BMI (Body Mass Index : 28.408163265306122
bottom of page