1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ipatiy [6.2K]
3 years ago
10

Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn

ing_heart_rate() to calculate the fat burning heart rate. The adult's age must be between the ages of 18 and 75 inclusive. If the age entered is not in this range, raise a ValueError exception in get_age() with the message "Invalid age." Handle the exception in __main__ and print the ValueError message along with "Could not calculate heart rate info." Ex: If the input is: 35 the output is: Fat burning heart rate for a 35 year-old: 129.5 bpm If the input is: 17 the output is: Invalid age. Could not calculate heart rate info.
Computers and Technology
1 answer:
gayaneshka [121]3 years ago
8 0

Answer:

#include <iostream>

# include <conio.h>

using namespace std;

float fat_burning_heart_rate(float age);

main()

{

float age,bpm;

cout<<"enter the age of the person"<<endl;

cin>>age;

if (age>=18 && age<=75)

{

bpm=fat_burning_heart_rate(age);

cout<<"fat burning heart rate for the age of"<<age<<"="<<bpm;

}

else

cout<<"Invalid age";

getch();

}

float fat_burning_heart_rate(float age)

{

 

float a;

 

a= (220-age)*0.7;

return a;

}

Explanation:

In this program, the variable named as age has been taken to enter the age of the person, needs to calculate the burning heart rate. All the variables taken in float, as the age and fat burning heart rate should come in decimal value.

The formula has been used as mention in question that,

a= (220-age)*0.7;

You might be interested in
An idea concerning what will happen in the future. (Crossword)
dangina [55]

Answer:

<h2>Expectation </h2>

Explanation:

Expectation is  an idea concerning what will happen in the future

7 0
3 years ago
Jake was working on an essay for his English class on a stormy Sunday afternoon. Before he could save his document, a big strike
matrenka [14]

Maybe in atosave, Computers mostly save what your working on :3

8 0
3 years ago
Suppose that a machine with a 5-stage pipeline uses branch prediction. 15% of the instructions for a given test program are bran
zhenek [66]

Answer:

solution attached below

Explanation:

3 0
3 years ago
You are building a gaming computer and you want to install a dedicated graphics card that has a fast GPU and 1GB of memory onboa
Vilka [71]

Answer:

a. PCI express

Explanation:

<em>PCI express</em> (Peripheral Component Interconnect Express) is a high speed serial bus and commonly used motherboard interface for  Graphics card, wifi, SSDs and HDs hardware connections. Simple PCI can also be used but PCI express has more error detection accuracy lesser number of I/O pins and better throughput as compared to simple PCI.

6 0
3 years ago
Write a simple Html structure and explain the meaning of each line
seropon [69]

Answer:

HTML stands for HyperText Markup Language and is the basic structural element that is used to create webpages. HTML is a markup language, which means that it is used to “mark up” the content within a document, in this case a webpage, with structural and semantic information that tells a browser how to display a page. When an HTML document is loaded by a web browser, the browser uses the HTML tags that have marked up the document to render the page’s content.

There are three types of code that make up a basic website page. HTML governs the structural elements, CSS styles those elements, and JavaScript enables dynamic interaction between those elements.

7 0
2 years ago
Other questions:
  • Linguist study
    9·1 answer
  • When you use the ip address of the web server, the correct site is displayed?
    15·1 answer
  • Which motherboard slot has direct access to the north bridge?
    7·1 answer
  • What two variables does mass depend on?
    5·1 answer
  • A software process describes the interrelationship among the phases by expressing their order and frequency, but does not define
    14·1 answer
  • )finding an unused location in the hash table is called
    5·1 answer
  • What does it mean to say that data in an Excel table is “dynamically linked” to a chart? What are the advantages of this feature
    5·1 answer
  • Explain the role of a computer in education​
    9·1 answer
  • a pair of shoes is on sale for 15% off with this discount customers will pay $9 if they buy the shoes ​
    14·1 answer
  • How much weight does a headgear need to carry
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!