Python Programming Create Python Program Takes Users Age Resting Heart Rate Computes Range Q43904693
Python Programming:
Create a Python program that takes a users age and resting heartrate, and computes the range of heart rates that correspond to eachof the zones below:
- Zone 1 (50-60%): This zone should feel supereasy — almost like you didn’t work out at all.
- Zone 2 (60-70%): This is the “average effort”level where it is still possible to hold a conversation.
- Zone 3 (70-82%): This is the “above averageeffort” level where you can only talk in one- or two- wordanswers.
- Zone 4 (82-92%): This is the “hard effort”level. Your breathing is labored, your arms and legs feel heavy,and you can’t sustain the pace for much more than an hour (atbest).
- Zone 5 (92-100%): This is the “all out” level.You can sustain this pace for a few seconds to maybe fiveminutes.
Necessary Formulas:
- max_heart_rate = 208 – (0.7 * age)
- resting heart rate is your heart rate when youhave been resting – i.e., sitting or lying for at least 20 minutes(user inputs this part)
- heart_reserve_rate = max heartrate – resting heart rate
- heart_rate_by _Percentage_Zone = resting heartrate + (heart reserve rate * desired percentage zone)
Important notes:
The lower bound of a zone is 0.01 greater than before it. (E.g.Zone 1 upper bound is 137.90, Zone 2 lower bound is 137.91)
Sample Output:
Please enter your age: 25 Please enter your resting heart rate: 59, ========================================= Your heart rate reserve is: 131.5 Here is a breakdown of your training zones: Zone 1: 124.75 to 137.90 Zone 2: 137.91 to 151.05 Zone 3: 151.06 to 166.83 Zone 4: 166.84 to 179.98 Zone 5: 179.99 to 190.50 Show transcribed image text Please enter your age: 25 Please enter your resting heart rate: 59, ========================================= Your heart rate reserve is: 131.5 Here is a breakdown of your training zones: Zone 1: 124.75 to 137.90 Zone 2: 137.91 to 151.05 Zone 3: 151.06 to 166.83 Zone 4: 166.84 to 179.98 Zone 5: 179.99 to 190.50
Expert Answer
Answer to Python Programming: Create a Python program that takes a users age and resting heart rate, and computes the range of hea…
OR