Question: target heartrate zone when exercising is: 2 0 years old is 1 0 0 to 1 7 0 beats per minute 3 0 years old
target heartrate zone when exercising is:
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
years old is to beats per minute
We will use the age as a minimum. So the first block will be to years old.
Use heart.py It included main and imports the Person class.
main will prompt the user for a name and an age
Set those values
Print the information about the person and the target heart rate
You must write the Person class in person.py
You must use heart.py that is provided in the Test zip file
The Person class should have:
A constructor that can have name and age passed in The name should default to and the age should default to
A str function that formats as the name, a space, the age, a space, years old
Make gettersetter properties as needed
Because of the way we have the age ranges, we will not allow any person to be younger than years old. Raise a ValueError, with the message invalid age if there is an attempt to set the age to less than Then let main print that message
A gettargetrate function that has no parameters and returns a tuple with the min and max target heart rate
Sample Run #bold underlined text is what the user types:
Name? Sue
Age?
Sue years old
Sue should aim for to bpm
Test # checks all output
Mini Test # output includes Sue years old and Sue should aim for to bpm on consecutive lines
Note: This is an introductory level python class and programming should reflect this. This problem covers classes and is composed of two different python scripts: heart.py already written and is just called upon in person.py and person.py this is what is actually being coded There is a sample test of what the output should look like when the program is runned.
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
