In this tutorial I am going to use Python 3.x to make a Command line application called BMI Calculator which measures BMI (Body Mass Index).
BMI : According to Wikipedia The BMI is an attempt to quantify the amount of tissue mass (muscle, fat, and bone) in an individual, and then categorize that person as underweight, normal weight, overweight, or obese based on that value.
Formula : BMI = W / (H/100 * H/100)
Where W is weight in KG and H stands for Height in Centimeter.
Script for BMI Calculator using Python
# Python based Simple Commandline BMI Calculator
# By Sanjay Prasad
print ("Enter Height in Centimeter : ")
height = float(input(''))
print ("Enter Weight in KG : ")
weight = float(input(''))
height = height/100
bmi= weight /(height*height)
print ("BMI : ", bmi)
BMI Calculator using Python Screen shot