Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is to be coded in Python !!! Guys, I need help with this please. I think I have written it like 5 times but

This is to be coded in Python !!!

Guys, I need help with this please. I think I have written it like 5 times but it is wrong brecause I have a poor understanding of functions.

Here it is what I need:

Write a program for a Honda regional office manager. Note: There is no data hard-coded in the program EXCEPT for two tuples. All data is entered by user. Each of the functional actions(the numbered requirements) bellow must be put in a function and called from within the main() function.

1- Creat two tuples-one for two weeks named "week one" and "week two" and one for three days of the week(thursday, friday, saturday).

2- use a loop to record the first name and last name of the sales people in one string(e.g. "Bill Simms") and the name of the dealership where they work in another string(e.g. "Hero Honda")

3- In each iteration of the loop, create a dictionary entry for the salesperson data entered where the name is the "key" and the dealership is the "value".

4- After populating dictionary, create two nested lops to process sales data.

5- The outer loop uses the weeks tuple and the inner loop uses the days tuple.

6- In the inner loop, ask the user to enter the number of cars sold by salesperson(display the salesperson's name to the user). Store the user's response in a list of sales data. For each salesperson, there should be six entries in the list.

7- Use a loop to have the user populate a list of 20 customer compliments. Include the sales reps names in each of the compliments.

8- Use nested loops to process customer compliments. The outer loop cycles through the sales reps and the inner loop cycles through the compliments. Use a sequense operation to search for each sales rep's name in each of the compliments.

For example, the outer loop is set to the first sales rep, the inner loop searches for the sales rep's name (the key in the dictionary) in compliment one, two, etc. Record the number of compliments associated with each sales rep.

More on the compliment section and how it is processed:

- user enters a compliment.

- the compliments include the sales rep names

-After collecting all compliments, will need nested loops(outside for each sales rep, inner for each compliment)

-search for the name of each sales rep in each compliment

-count the number of times you find a compliment for each sales rep

At the end of program, there should be an output like this bellow for each of the sales reps processed.Sample output:

Bill Simms of Hero Honda

Cars sold

week one

Thursday: 2

Friday:1

Saturday: 4

week two

Thursday: 4

Friday: 6

Saturday: 9

Total Cars sold(per rep):___

Average Cars sold(per rep):___

Number of compliments (per rep):___

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

What is conservative approach ?

Answered: 1 week ago