answer.
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
Andre45 [30]
2 years ago
13

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:

Computers and Technology
1 answer:
Brut [27]2 years ago
8 0

Answer:

def get_age():

age = int(input())

if(age>=18 and age<=75):

return age

else:

raise ValueError("Invalid age.")

def fat_burning_heart_rate(age):

return ((70 / 100) * (220 - age))

if __name__ == '__main__':

try:

age = get_age()

print("Fat burning heart rate for a",age,"year-old:",fat_burning_heart_rate(age),"bpm")

except ValueError as ve:

print(ve.args[0])

print("Could not calculate heart rate info.")

Explanation:

def get_age():

age = int(input())

if(age>=18 and age<=75):

return age

else:

raise ValueError("Invalid age.")

def fat_burning_heart_rate(age):

return ((70 / 100) * (220 - age))

if __name__ == '__main__':

try:

age = get_age()

print("Fat burning heart rate for a",age,"year-old:",fat_burning_heart_rate(age),"bpm")

except ValueError as ve:

print(ve.args[0])

print("Could not calculate heart rate info.")

The above program performs an operation to determine the percentage of fat burning rate.

It takes the value of the ages of some adult as input, performs a series of conditional statement function on them. Before given an output .

Kindly check attachment for output

You might be interested in
Charlie has a large book collection. He was keeping track of it in a spreadsheet, but it has grown big enough that he wants to c
zepelin [54]

Answer:

Check the explanation

Explanation:

Ans 1) storing the data in one single row comes with its own barriers and that is if you delete one of the record in the spreadsheet, all the equivalent records which you didn't wanted to delete would be deleted. For take for instance, if you wish to delete the record of author "James Taylor" then all the books he has written would also be deleted from the spreadsheet.

Ans 2) In 1NF, all row is expected to have only 1 tuple, but here in this spreadsheet the title field for Author "James Taylor" has 2 books, so it would be separated into single rows.

Ans 3) The table in the attached image below doesn't delete with Delete anomaly, i.e., for author "May Norton" if you delete this record, then the only book written by her would be deleted.

So, you have to convert this table into 2NF.

Make separate tables for Author and Book

Author(Author Name, Author Country)

Books(Author Name, Book title, Publisher, Publisher Location, Year, price)

This cannot be normalized any further.

3 0
1 year ago
Which of the following is a collection of unprocessed items, which can include text, numbers, images, audio, and video?A. DataB.
Tema [17]

Answer:

Option A is the correct answer for the above question.

Explanation:

Data can be defined as raw fact which can be useful when it will be processed. The processed data can be formed as information. The data can be anything. It can b e text or audio or images or video. The above question asked about the term which is an unprocessed item and can form information after processing. Then the answer is Data which stated from the option A. So Option A is the correct answer while the other is not because--

  • Option B states about instruction which is useful to process the data.
  • Option C states about Programs that can be formed when one or more instruction is grouped.
  • Option D states about the information that the user can get after processed the data.

6 0
2 years ago
Splunk In most production environments, _______ will be used as the source of data input?
Wittaler [7]

Answer: Forwarders

Explanation:

Splunk is defined as the software technology which helps in organization of applications, examining and monitoring of the data and information analytics.It performs the operation of indexing, processing and gathering to produce graphs, alert ,report etc .

  • Forwarders are the component of Splunk software that gathers the information and transmit it to the Splunk clod for further analysis and processing .It is considered as the reliable method for input of data.

6 0
1 year ago
Harry wants to change the background of all of his presentation slides. Which slide will enable him to make this change to all t
Alexxx [7]

Harry would need to change the "color scheme" to change the background of all his presentation slides.

3 0
2 years ago
Read 2 more answers
If Mark is developing a website to be optimized for mobile devices, what would be the top-level domain?
umka2103 [35]

Answer:

A top-level domain or the TLD is the domain at the highest level in the hierarchy of the DNS. And that means in the Internet DNS. Also, the top-level domain is installed in the namespace toot zone. And the top-level domain is the .com, in general, to be named as the best one. The next two are the .net and .org. But since it is required to optimize the website for the mobile devices, we should select here .com.

Explanation:

Please check the answer section.

5 0
1 year ago
Other questions:
  • Which of the following best describes the concept behind Web 2.0
    5·1 answer
  • python Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value i
    7·1 answer
  • Consider a router that interconnects three subnets: subnet 1, subnet 2, and subnet 3. suppose all of the interfaces in each of t
    11·2 answers
  • Explain what might happen if two stations are accidentally assigned the same hardware address?
    15·1 answer
  • A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi
    6·1 answer
  • Create an abstract Division class with fields for a company's division name and account number, and an abstract display() method
    14·1 answer
  • Look at the following array definition:
    11·1 answer
  • Write a method named removeDuplicates that accepts a string parameter and returns a new string with all consecutive occurrences
    7·1 answer
  • Ishaan is confused between the terms webpage and website help him in understanding the difference between both​
    11·1 answer
  • Chinh wants to have a program print, "Sorry, but that isn’t one of your options" until the user enters the correct information.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!