Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You work for a shipping company and your manager receives orders from various customers every day (some existing, some new). Your manager wishes to establish
You work for a shipping company and your manager receives orders from various customers every day (some existing, some new). Your manager wishes to establish a process to automate tracking the orders received by the company. You can assume the daily data arrives as a list/array/vector of strings and follows this exact format (note that customers may place separate orders in a single day): day_i = [“Bob:100”, “Alice:100”, “Celia:110”, “Bob:20”, etc...] Write a script that, when given the daily data, will keep track of the total purchase amount for each customer. You can assume that the data “day_i” already exists in memory (i.e. you don’t need to read it from a text file or database). Your output should ideally look like: Customer Total Purchase Alice 100 Bob 120 Celia 110
In python language
Step by Step Solution
★★★★★
3.40 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
Its good to consider this as a dictionary with keyvalue pair or as a twodimensional array And ...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