Question: Using Python: This program must use three functions. One function will print a summary/introduction for the program. A second function, calculateBMI, will accept two parameters

Using Python: This program must use three functions. One function will print a summary/introduction for the program. A second function, calculateBMI, will accept two parameters (the height and weight). It will calculate and print the BMI. Note: BMI = (weight in pounds x 703) divided by (height in inches)squared It will then ask if the user wants to see the category corresponding to their BMI.

If the answer is yes: the program will call the third function category(BMI).

This third function, category(BMI), will use the following BMI categories to determine and print the appropriate category for their BMI.

Underweight =< 18.5

18.5 < Normal weight <25

25<=Overweight<30

Obesity = BMI of 30 or greater

If the answer is no, the function will print Have a nice day message.

The main program will:

Call the first function to print the introduction,

Ask a user for their height in inches and their weight in pounds.

Call the calculateBMI function

If the input is:

110

62

Y

Your output should be:

This program will accept a person's height in inches and weight in pounds and print the BMI

The user may choose to have the category for his/her BMI printed

What is your weight in pounds? 110.0

What is your height in inches? 62.0

Based on a weight of 110.0 and a height of 62 your BMI is 20.1

Do you want to know the category for your BMI? (Enter Y or N)Y

A BMI of 20.1 is categorized as normal weight

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!