Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a code which takes a text file which contains record of product sales. Each record is placed on a separate line, and consists of
Write a code which takes a text file which contains record of product sales. Each record is placed on a separate line, and consists of space separated fields containing from left to right the date time of the sale, the product name, and the number of product items sold quantity respectivelyWrite a Python program to find and display the median quantity sold for each product found in the text file The output must be alphabetized by product name. Read and store the sales data in a dictionary, with product names as dictionary keys while the corresponding values should be the lists of sold quantities. Make use of the dictionary's get method.
I ALREADY HAVE THE TEXT FILE, I CANT ATTACH IT ON CHEGG, PLEASE JUST WRITE THE CODE WITH IN MIND I HAVE THE TEXT FILE
Example of how it is in the text file, PLUS MORE, NOT ONLY THESE
::Skrewdriver,
::Pliers,
::ACDC Tester,
::Snips,
::Connector,
::Pliers,
::Alligator Clip,
::Pliers,
::Alligator Clip,
::Ring Terminal,
::Connector,
::Alligator Clip,
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