Body Mass Index (BMI) is a measure of body fats based on a person's height and weight.
Write a Python program which accepts three inputs: user's name, weight and height. The program should compute the BMI of the user and provide appropriate advice based on the BMI.
There will be three inputs.
The program should print a message consisting of the user's BMI and the appropriate advice in the following format:
Dear [user's name], your BMI is [user's BMI truncated to 2 decimal place].
[advice for the user based on the table shown below]
BMI | Message |
---|---|
BMI >= 22 | Please exercise more! |
18 <= BMI < 22 | Keep it up! |
BMI < 18 | Please eat more! |
INPUT:
Please enter your name: Jason
Please enter your weight in kilograms: 55
Please enter your height in metres: 1.72
OUTPUT: