How To Code in Python

How To Code in Python

BMI Calculation With Python

 

 

BMI = (weight)kg / (height)m²

weight = float(input('Enter your weight in kg: '))
height = float(input('Enter your height in meters: '))
H = height ** 2
BMI = float(weight//H)
print(BMI)

output

Round function:

print(round(3.712))
print(round(3.421))
print(round(3.5))
print(round(4.5))
print(round(4.5290, 2))
print(round(605, -1))
print(round(655, -2))

OUTPUT

administrator

Related Articles

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *