Skip to content

Commit a079952

Browse files
authored
Merge pull request #22 from Chirag-v09/patch-1
Create BMI Calculator using Python.py
2 parents f3b17d8 + 38b9bd8 commit a079952

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

BMI Calculator using Python.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Program to calculate BMI
2+
3+
# Getting Inputs:
4+
height = int(input('Enter height: '))
5+
weight = int(input('Enter weight: '))
6+
7+
# Function to calculate BMI
8+
def BMICalculator(height, weight):
9+
bmi = weight/(height**2)
10+
return bmi
11+
12+
# Calling BMI function
13+
bmi = BMI(height, weight)
14+
print("The BMI is", format(bmi), "so ", end='')

0 commit comments

Comments
 (0)