Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Explain the purposes of managing performance.

Answered: 1 week ago