Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that a firm uses a nested dictionary to maintain the information on annual sales made from various sales strategies for 2018, 2019, and

Assume that a firm uses a nested dictionary to maintain the information on annual sales made from various

Assume that a firm uses a nested dictionary to maintain the information on annual sales made from various sales strategies for 2018, 2019, and 2020. {'2018': {"Radio Sales": 5000, "TV Sales": 26000, "Direct-Mail Sales": 1000, "Telephone Sales": sales_3_years 26000}, 0}, '2019': {"TV Sales": 26000, "Online Sales": 37000, "Telephone Sales": 9000, "Radio Sales": 300 '2020': {"Telephone Sales": 8000, "TV Sales": 19000, "Online Sales": 107000}} Write a comprehension to output the annual sales made from all sales strategies for each year. Your output should look like the following (Hint: use sum() on the return value of .values()): {'2018': 58000, 2019': 75000, 2020': 134000} Write a comprehension to figure out which strategy creates the highest sales for each year. Your output should look like the following: {'2018': [ 'TV Sales', 'Telephone Sales' ], '2019': [ 'Online Sales'], '2020': ['Online Sales']} Write a (possibly nested) for loop to answer: How many distinct strategies have been used? What are the total sales made from them for the 3 consecutive years? Store your result in a dictionary that looks like the following (the order in which entries are listed can be different): {'Radio Sales': 8000, 'TV Sales': 71000, 'Direct-Mail Sales': 1000, 'Telephone Sales': 44000} 43000 ate Online Sales': 1 Go to Settings to activate Windows.

Step by Step Solution

3.42 Rating (146 Votes )

There are 3 Steps involved in it

Step: 1

Nested dictionary comprehension to output annual sales ... 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

Horngrens Accounting

Authors: Tracie L. Miller nobles, Brenda L. Mattison, Ella Mae Matsumura

12th edition

9780134487151, 013448715X, 978-0134674681

More Books

Students also viewed these Computer Network questions

Question

2. Discuss validation, editing, and coding of survey data.

Answered: 1 week ago

Question

Demonstrate knowledge of the company/organization and the position.

Answered: 1 week ago

Question

What does non-recourse financing mean?

Answered: 1 week ago

Question

What is a bank reconciliation?

Answered: 1 week ago

Question

Explain the difference between static and flexible budgets.

Answered: 1 week ago

Question

Explain the posting process of the sales journal.

Answered: 1 week ago