Question: ISM 3 2 3 0 Individual Assignment 1 - Working with Variables and Expressions Basal metabolic rate ( BMR ) is the minimal rate of
ISM
Individual Assignment Working with Variables and Expressions
Basal metabolic rate BMR is the minimal rate of energy expenditure per unit time by warmblooded organisms at rest. This can also be expressed as the amount of energy one needs to consume per day to maintain the same body weight.
Several mathematical models exist that predict with varying levels of accuracy the BMR for people based on the person's weight, height, age and gender. One such model is the Revised HarrisBenedict equation that gives the amount of Calories needed per day for a man:
weight height age
where
weight is in kilograms
height is in centimeters
age is in years
The amount of energy contained in food is also expressed in Calories. A medium apple contains about Cal, a single strawberry has on average Cal.
Requirements:
Create a program that asks the user to enter the weight, height and age of a person and then calculates the BMR for a male. In addition, it calculates how many whole apples and whole strawberries must be consumed per day to sustain the calculated BMR The height and weight is provided by the user in imperial units, you must convert them to metric units in your program. Use named constants for conversion factors between metric and imperial, as well as for the amount of Calories for the different fruit.
Prompt the user to enter three numbers: weight in pounds, height in inches, and age in years. Convert the user input to numeric variables. Weight and height should be floats, age should be an integer.
Convert the weight and height to kilograms and centimeters, respectively, and store them to new numeric variables. Use constants for the conversion factors constants are variables with the naming convention of capitalized names with an underscore between words There are
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
