Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2) 5 test cases, 1 point for each passed test case. (5 points total) Using Python in the Jup. Notebook, write a function called

image text in transcribed

image text in transcribed

Problem 2) 5 test cases, 1 point for each passed test case. (5 points total) Using Python in the Jup. Notebook, write a function called q summary Vl which takes as input: numbers - a list of numbers The function q summary VI should return a dictionary containing the min, Q1, Q2, Q3, and max. Feel free to utilize the numpy function for quantile instead of implementing the formulas to calculate index positions that we reviewed in class. You will not lose credit for using numpy or for using default python, however, your answers should be correct either way. q_summary_V1 should also warn the user if there are any outliers by printing them to the screen. The following screenshot shows an example function call: These are the two test cases that you should pass to gain 2/5 points as well. grades = sorted([0, 0, 14, 35, 91, 100, 81, 77, 75, 66, 78, 80, 81, 63, 87, 90, 89]) print(q_summary_v1(grades)) The following are outliers: [0, 0, 14] {'min': 35, 'qi': 63.0, '92': 78.0, '93': 87.8, 'max': 100} times = [5, 10, 10, 15, 15, 15, 15, 20, 20, 20, 25, 30, 30, 40, 40, 45, 60, 60, 65, 89] print(q_summary_v1(times)) The following are outliers: [89] {'min': 5, 91': 15.0, '92': 22.5, '93': 41.25, 'max': 65} Problem 2) 5 test cases, 1 point for each passed test case. (5 points total) Using Python in the Jup. Notebook, write a function called q summary Vl which takes as input: numbers - a list of numbers The function q summary VI should return a dictionary containing the min, Q1, Q2, Q3, and max. Feel free to utilize the numpy function for quantile instead of implementing the formulas to calculate index positions that we reviewed in class. You will not lose credit for using numpy or for using default python, however, your answers should be correct either way. q_summary_V1 should also warn the user if there are any outliers by printing them to the screen. The following screenshot shows an example function call: These are the two test cases that you should pass to gain 2/5 points as well. grades = sorted([0, 0, 14, 35, 91, 100, 81, 77, 75, 66, 78, 80, 81, 63, 87, 90, 89]) print(q_summary_v1(grades)) The following are outliers: [0, 0, 14] {'min': 35, 'qi': 63.0, '92': 78.0, '93': 87.8, 'max': 100} times = [5, 10, 10, 15, 15, 15, 15, 20, 20, 20, 25, 30, 30, 40, 40, 45, 60, 60, 65, 89] print(q_summary_v1(times)) The following are outliers: [89] {'min': 5, 91': 15.0, '92': 22.5, '93': 41.25, 'max': 65}

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

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions

Question

=+6. What problem(s) does this public have related to this issue?

Answered: 1 week ago

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago

Question

Explain basic guidelines for effective multicultural communication.

Answered: 1 week ago

Question

Identify communication barriers and describe ways to remove them.

Answered: 1 week ago

Question

Explain the communication process.

Answered: 1 week ago