Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python 3.6- I need to write the output I got in a text file called heartRate.txt with this information: Send me source code showing how
Python 3.6- I need to write the output I got in a text file called heartRate.txt with this information:
Send me source code showing how to create and write to the text file the output listed below. Thanks
def heartRate () # First get input from the user name- input("Enter your name: ") age- int (input ( "Enter your age: ")) restHR-int(input("Enter your resting heart rate: ")) # Maximum heart rate max HR220age # Low range low = int ( (max HR-restHR) * .65) + restHR # High range high = int (( max HR-rest!R)" .85) + restHR # Print response print(str (name) ,for your age:+ str(age)) print("Resting heart rate: "+ str(restHR)) print( "Your target heart rate is "+str(low)"to "+ str(high) + "beats per minute.") 9 heartRate() un: heartRate heartRate heartRate rary/ Frameworks/ Python . framework/ Versions/ 3 . 6 /bin Users/PratyushaThundena/Pycharm Enter your name: pt Enter your age: 150 Enter your resting heart rate: 22 pt, for your age: 150 Resting heart rate: 22 Your target heart rate is 53 to 62 beats per minute. Process finished with erit code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started