Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In [1]: # Don't change this cell; just run it. import numpy as np from datascience import * # These lines do some fancy plotting
In [1]: # Don't change this cell; just run it. import numpy as np from datascience import * # These lines do some fancy plotting magic. import matplotlib %matplotlib inline import matplotlib.pyplot as plt plt.style.use('fivethirtyeight') import warnings warnings.simplefilter('ignore', FutureWarning) from client.api.notebook import Notebook ok = Notebook ('hw05.ok') = ok.auth(inline=True) 1. 2019 Cal Football Season Shoumik is trying to analyze how well the Cal football team performed in the 2019 season. A football game is divided into four periods, called quarters. The number of points Cal scored in each quarter, and the number of points their opponent scored in each quarter are stored in a table called cal_fb.csv. In [2]: # Just run this cell # Read in the cal_fb csv file games = Table().read_table("cal_fb.csv") games.show() Let's start by finding the total points each team scored in a game. Question 1. Write a function called sum_scores . It should take four arguments, where each argument is the team's score for that quarter. It should return the team's total score for that game. In [3]: def sum_scores(...): "Returns the total score calculated by adding up the score of each qua sum_scores (14, 7, 3, 0) #DO NOT CHANGE THIS LINE
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