Now we know the operations and variables in Python. Let's write a program to calculate the BMI.
BMI = weight / (height * height)
Here weight
is in kg (kilogram) and height
is in mt (meters)
height
with value 1.7
weight
with value 72.25
bmi
and calculate the value of BMI using the above formula.bmi
into int type.print(bmi)
. You should get 25
not 25.0.Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Please login to comment
0 Comments
There are 98 new comments.