Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To maintain ones body weight, an adult human needs to consume enough calories to (1) meet the basal metabolic rate ( energy required to breathe,

To maintain ones body weight, an adult human needs to consume enough calories to (1) meet the basal metabolic rate ( energy required to breathe, maintain body temp,), (2) account for physical activity such as exercise, and (3) account for the energy required to digest the food that is being eaten.

If an adults weights P pounds:

1) Basal Metabolic rate: calories required = 70 * (P/2.2)0.756

2) Physical activity (approx.): calories required = 0.0385 * 5 * P * minutes

Where minutes is the amount of time spent exercising that day.

3) Energy to digest food: calories = calories eaten * 0.1

Write a function to calculate the basal metabolic rate, taking as input the weight & returning the calories.

Write another function to calculate the physical activities calories, taking as input the weight & minutes spent and returning the calories.

Write another function to calculate the digestion calories, taking as input the calories eaten & returning the calories.

Now write the main program, that prompts the user for the inputs, calls the three function to calculate the total calories needed for the day (sum of the three returned values). The program then tells him/her if they ate too many or too little calories for the day.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

=+ Are they breakable for any reason?

Answered: 1 week ago

Question

=+When and under what circumstances are contracts renegotiated?

Answered: 1 week ago