Problem Description
Write a program that computes the body mass index (BMI) of an individual.
Your program should begin by reading a height and weight from the user. If you read the height in meters and the weight in kilograms then body mass index is computed using this slightly simpler formula:
BMI = weight / height *height
Use round function in the final output valueCODING ARENA
a=float(input())
b=int(input())
c=b/(a*a)
print("The BMI IS",round(c,2))
Test Case 1
Input (stdin)1.69
64Expected OutputThe BMI IS 22.41
Test Case 2
Input (stdin)1.72
71Expected OutputThe BMI IS 24.0
✖
Share this Posts
Subscribe Our Newsletter
0 Comment
Post a Comment