View the step-by-step solution to:

Question

# Question 3 , 4 , 5 . Thank you ATTACHMENT PREVIEW Download attachment Screen Shot 2019-09-30 at 11.33.56 PM.png Question 3. Write a function called compute_calories . It should take 4 arguments, the amounts of time (in minutes) spent on yoga, walking, sprinting, and volleyball, respectively. It should return the total number of calories burned. In [l1]: def compute_calories(.. ., .. ., .. ., . . .) In [ ]: ok.grade( &quot;q1_3&quot; ); Question 4. Make a table called exercise_with_tota1s that's a copy of exercise , but with an additional column called &quot;Total calories burned exercising&quot;. That column should contain the total number of calories burned from exercise on each day. Compute that column using apply and your compute_calories function. Hint: If you want to apply a function that takes multiple arguments, you can pass through multiple column names as arguments in tbl . app1y( ) to call your function on all corresponding columns. In [14] : exercise_with_totals = . . . exercise_with_totals In [ ]: ok.grade( &quot;q1_4&quot; ); Question 5. How many calories were burned from exercise in the 2nd week of January (that is, on days 8 through 14, inclusive)? Call that number calories_burned . Compute the answer with code, not by looking at the data. In [18] : calories_burned = . . . calories_burned In [ ]: ok.grade(&quot;q1_5&quot;);

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents