Data 8R

Plotting Functions

Summer 2017

Discussion 7: July 20, 2017

1

Midterm Review

Question 4 Part 1, Question 5 Part 1, Question 8.

2

Review: Defining Functions

Define the following functions, according to what their docstrings say: def feet_to_cm(feet): """ 1 foot is 30.48 cm. """

def first_and_last(array) """ Given an array, returns a new array with only the first and last element """

def max_diff(array): """ Given an array, return the biggest difference between adjacent elements of the array. >>> max_diff(make_array(10, 3, 5, 6)) 7 """

def percent_change(initial, new): """ Returns the percentage change between the initial and new values. >>> percent_difference(40,50) 25.0 """

2

Plotting Functions

def challenge(table): """ Given a table that has the columns "initial" and "new", return a new table with an additional column, " percent change". """

3

Applying Functions onto Tables

Imagine that we have a table about physics data called physics data: Time 1 2 9 ...

Distance (ft) 5 5 8 ...

In physics calculations, we often want to have the data in terms of centimeters. Create a table called cm table that has the original data and a new column called Distance (cm).

cm_table = ...

Now, calculate the average velocity by defining a general function that calculates velocity, and then applying that function onto the table: Hint: Velocity = distance / time

def velocity(distance, time):

table_with_velocity = ...

Data 8R Plotting Functions Summer 2017 1 Midterm Review ... - GitHub

Data 8R. Plotting Functions. Summer 2017. Discussion 7: July 20, 2017. 1 Midterm Review. Question 4 ... function onto the table: Hint: Velocity = distance / time.

94KB Sizes 1 Downloads 315 Views

Recommend Documents

Data 8R Plotting Functions Summer 2017 1 Midterm Review ... - GitHub
Jul 20, 2017 - In physics calculations, we often want to have the data in terms of centimeters. Create a table called cm table that has the original data and a ...

Data 8R Table Methods and Functions Summer 2017 1 ... - GitHub
Jul 18, 2017 - We have the dataset trips, which contains data on trips taken as part ofa ... def num_long_trips(cutoff): ... We want to see what the distribution of.

Data 8R Table Methods and Functions Summer 2017 1 ... - GitHub
Jul 18, 2017 - Data 8R. Table Methods and Functions. Summer 2017. Discussion 7: ... its range - the difference between the highest value in the array and.

Data 8R Review of Table Methods Summer 2017 - GitHub
Jul 18, 2017 - We find that most trips have smaller length, but a few are very long. We want to see what the distribution of commute lengths looks like, and ...

Data 8R Review of Table Methods Summer 2017 - GitHub
Jul 18, 2017 - We also figure that commuters will be subscribers to the program, not one-time users. ... return np.mean(short_commute.column( Duration ) ...

Data 8R Hypothesis Testing Summer 2017 1 Terminology 2 ... - GitHub
Jul 27, 2017 - simulated on a computer. ... From the histogram, it looks like the higher mean from gambling was not at all that unusual - it certainly could have.

Data 8R Tables and more Visualizations Summer 2017 1 ... - GitHub
Jul 11, 2017 - At the same time, the researcher also records the number of ... A business has graphed the proportion of outputs in each year as a bar chart.

Data 8R Tables and more Visualizations Summer 2017 1 ... - GitHub
number of colds each volunteer gets. Is this an observational ... questions about it. A business has graphed the proportion of outputs in each year as a bar chart.

Data 8R Data Types and Arrays Summer 2017 1 A Test of Skill - GitHub
1 A Test of Skill ... errors) of the following lines of Python code! >>> 6 / 3 ... Luckily, they've supplied a function named bar(labelArray, dataArray) to do.

Data 8R Data Types and Arrays Summer 2017 1 A Test of Skill - GitHub
Data 8R. Data Types and Arrays. Summer 2017. Discussion 4: July 6, 2017 ... Impress the squirrels with your knowledge of data types! .... 4 Data Manipulation.

Data 8R Intro to Python Summer 2017 1 Express Yourself! 2 ... - GitHub
Mike had a tremendous growth spurt over the past year. Find his growth rate over this 1 year. (Hint: The Growth Rate is the absolute difference between the final.

Data 8R Intro to Visualizations Summer 2017 1 Similarity and ... - GitHub
Jun 27, 2017 - The chips that are present in your computer contain electrical components called transistors. ... Here's another attempt to improve the plot:.

Data 8R Intro to Python Summer 2017 1 Express Yourself! 2 ... - GitHub
An expression describes to the computer how to combine pieces of data. ... inputs to a call expression are expressions themselves, you can have another call ...

Page 1 Math 3 Midterm Review - Functions, Lines, Systems ...
t 2 SO + H. SOX . 2, SO -- A. (2 10, SO). 34. Sarah went to the candy store to buy treats for her. Halloween party. She came out with 11 pounds of candy. She.

Midterm - GitHub
Feb 21, 2017 - How would your decision to use validation/holdout or k-fold cross validation affect your ability to obtain out-of-sample predictions from the ...

Math 0980 Midterm 1 Review Workshops - FALL 2017.pdf ...
Thursday 21-Sep-2017 7:00-8:00 PM WVC WVC 124. Friday 22-Sep-2017 12:00-1:00 PM Redwood Dumke STEM SI 101B. Tuesday 26-Sep-2017 6:00-7:00 ...

Innovative Projects Summer 2017 - GitHub
Jan 31, 2017 - 10. Page 2 http://nokiawroclaw.pl/ https://github.com/nokia-wroclaw/ .... Develop a tool that will notify person via android app that some system ...

Perceptual Reward Functions - GitHub
expected discounted cumulative reward an agent will receive after ... Domains. Task Descriptors. Figure 3: Task Descriptors. From left to right: Breakout TG, ...

Recursive Functions - GitHub
Since the successor function can increment by one, we can easily find primitive ... Here we have used the convention of ending predicate names with “?”; in this .... that is, functions that are undefined, or divergent, at some values in the domai

2016 Algebra 1 Midterm Review Power Point.pdf
Page 1. Whoops! There was a problem loading more pages. 2016 Algebra 1 Midterm Review Power Point.pdf. 2016 Algebra 1 Midterm Review Power Point.pdf.

Physics-based basis functions - GitHub
effect of element mutual coupling on both signal and noise response of the .... evlamemo69.pdf ..... {10o, 20o, 30o, 40o, 50o}, which give rise to a rank-five voltage covariance matrix. ... An illustration of two sets of CBFPs for modeling the.

Wildwood 2017 Summer (1).pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Wildwood 2017 ...

Algebra 2 Midterm Review Guide
6) Write the equation of the horizontal line through the point (3, -7). 7) Write the .... 20) Marcus is shooting of a rocket from a 160 foot cliff at a velocity of 48 ft/sec.

Midterm Review 2013-2014.pdf
From Slavery Deleting/abridging a quote ave a Dream" es of Conflict in Literature Content Questions. Night. Irary Terms: Up From Slavery ile "I Have a Dream" aphor "Reading With Mrs. Dorris" phora Freedom Writers racters in ... )S6 You need to knoW: