Question: 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

Python 3.6- I need to write the output I got in a

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

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!