Question
You are working at a retail store that has outdated sales and inventory technology. Your manager would like to know if any customers are buying
You are working at a retail store that has outdated sales and inventory technology. Your manager would like to know if any customers are buying the same product, and who is spending the most money at the store. You tell her you have some Python experience and can write a program to handle three customers, to see if this is an idea worth turning into a full app. Your program will ask for the most recently ordered item for three customers, as well as their total store spending. The program will output how many items are the same, and which customer has spent the most money in the store.
What your Python program should do
Create a new repl for this lab. Do not reuse a repl from lecture activities.
Ask the user to enter the first customers most recently ordered item. An item name will be a word or series of words which can contain spaces, punctuation, and lowercase and uppercase letters.
Ask the user to enter the first customers total store spending as a number that can contain a decimal, with no dollar sign.
Repeat the above two steps for the second and third customer.
Using your Python knowledge, determine how many of the items have the same name. Show this information to the user. There should only be one line of output for this part.
Determine which customer has spent the most money in the store. Show this information to the user. There should only be one line of output for this part.
Assumptions, clarifications, and hints
- For every Python assignment in this class, dont do anything manually. Use Python code and design the logic so that the program does it for you.
- You can assume the user will enter valid input as per the instructions.
- There should only be one line of output for how many item names are the same, and only one line of output for which customer has spent the most money.
- Your program should be able to handle a decimal value for the total spending.
- Get in the habit of using useful variable names (not x, y, z, etc.) so you can keep track of all the information youre working with.
- Do not use max() anywhere in your code.
- Think about what it means to have the same item name. Scotty is not the same scotty (lowercase s).
- You can assume each customer will have a unique total spend.
- Thinking questions: is it possible to have three items with the same name? Two items? Zero items? How about one item?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started