Basic Programs

Python Program to Calculate Body Mass Index(BMI)

Write a python program to input weight(W) and height(H) from the user and calculate Body Mass Index(BMI).

BMI formula is,

bmi = kg/m2


  • kg - weight in kiligrams
  • m - height in meters
w=float(input("Enter Your Weight (in kg) : "))
h=float(input("Enter Your Heihgt (im meters) : "))
print("BMI is : ",bmi)


Enter Your Weight (in kg) : 65
Enter Your Heihgt (im meters) : 1.75
BMI is :  21.224489795918366

Prev Next