Question: list help Coding Problem 4.3.6 (External resource) (3.0 points possible) Fitbitpy SubmitRun Grades Reset 1 #Imagine you're writi some code for an exercise tracker Console

list help Coding Problem 4.3.6 (External resource) (3.0 points possible) Fitbitpy SubmitRunlist help

Coding Problem 4.3.6 (External resource) (3.0 points possible) Fitbitpy SubmitRun Grades Reset 1 #Imagine you're writi some code for an exercise tracker Console output will be displayed here 2 #The tracker, measures heart rate, and should display the 3 #average heart rate from an exercise session 5?However, the tracker doesn't automatically know when the 6 #exercise session began. It assumes the session starts the 7 #first time it sees a heart rate of 100 or more, and ends B #the first time it sees one under 100 16 #Irite a function called average heart rate 11 average-heart-rate should have one parameter, a list of 12 #integers. These integers represent heart rate measurements 13 #taken 30 seconds 14 #the average of all heart rates between the first 18 + 15 theart rate and the last one. Return this as an integer 16 #(use floor division when calculating the aver ge) apart. average heart rate should return 17 # 18 #You nay assume that the list will only cross the lee beats 19 #perninute threshold once: once it goes above 100 and below 20 #again, it will not go back above 21 23 #Add your function here! 24 25 26 27 #Below are sone lines of code that will test your function 28 You can change the value of the variable(s) to test your 29 #function with different inputs. 30 # 31 #If your function works correctly, this will originally 32 #print 114 (because there are 13 measurements from 102 to 3 #101, their sum 15 1484, and 1484 // 13 is 114) 34 beats-[72, 77, 79, 95, 102, 105, 112, 115, 120, 121, 121, 35 36 print(average_heart rate(beats)) 37 25, 125, 123, 119, 115, 10, 191, 96, 92, 90, 85] 39

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!