Question: While exercising, you can use a heart-rate monitor to see that your heart rate stays within a safe range suggested by your trainers and doctors.

While exercising, you can use a heart-rate monitor to see that your heart rate stays within a safe range suggested by your trainers and doctors. According to the American Heart Association (AHA), the formula for calculating your maximum heart rate in beats per minute is 220 minus your age in years (http://bit.ly/AHATargetHeartRates). Your target heart rate is a range that is 50–85% of your maximum heart rate. Write an app that inputs the person’s age, then calculates and displays the person’s maximum heart rate and target-heart-rate range.

Step by Step Solution

3.26 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure heres a simple Python script that takes a persons age as input and calculates their maximum heart rate and target heart rate range def heartratecalculator age intinputEnter your age maxheartrate 220 age targetheartratemin 050 maxheartrate targetheartratemax 085 maxheartrate printfYour maximum heart rate is maxheartrate beats per minute printfYour target heart rate range is targetheartratemin targetheartratemax beats per minute heartratecalculator When you run this script it will prompt you to enter your age After you provide your age it will calculate ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java How To Program Late Objects Questions!