Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def analysis(self, inventory): Computes two descriptive statistics of the inventory amounts associates with each key in the inventory dictionary. Creates a new dictionary that

def analysis(self, inventory):
"""
Computes two descriptive statistics of the inventory amounts associates
with each key in the inventory dictionary. Creates a new dictionary
that has the same keys as inventory, but the values are tuples with
min, max, total, and average information.
inventory: dictionary of items with the following keys and values
key: alphabetic string, type of item
value: list of non-negative integers, amounts on inventory for
a particular type of item
Returns: new dictionary
key: alhpabetic string, same as the key in inventory
value: tuple of four elements, corresponding to:
min, max, total, and average of inventory amounts.
Exammple
analysis({'table': [70, 90, 100], 'chair': [75, 95]}) returns
{'table': (70, 100, 260, 86.6), 'chair': (75, 95, 170, 85.0)}

"""

Assistance please. No idea where to start. Language is Python.

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_2

Step: 3

blur-text-image_3

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

Explain all drawbacks of application procedure.

Answered: 1 week ago