Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Phycharm An electronics retailer wants to track how many notebooks are sold online and how many notebooks are sold offline (in store). To do this,

Phycharm An electronics retailer wants to track how many notebooks are sold online and how many notebooks are sold offline (in store). To do this, write a program that saves the sales in a global list. Each notebook is stored as a tuple in this list. The tuple consists of the following elements (note the order):  notebook_id (ascending number starting with 1) price(Random, float between 600 and 3200, rounded to 2 decimal places)  online_sales (random, integer between 100 and 500)  offline_sales (random, integer between 50 and 250) Tasks: Graphical Interface: Design a graphic interface as shown in the figure. Right at the beginning, create a function for each button with 'print' or 'pass' as a placeholder. The window in the figure is divided with several frames. In the bottom row there is a label for error messages (in red font color) Add notebooks button: The amount of notebooks is taken from the entry widget (use try-except). These notebooks are added to the existing list and tree view. The value range of the random numbers can be found in the enumeration of the tuple elements. Remove notebooks button: All notebooks are removed from the list and the tree view. Save notebooks button: The user can save the current data of the list in CSV format. The file name and storage path are determined using the file dialog. Example of a saved file: Notebook ID; Price; online sales; offline sales 1; 2958.72; 367 ; 53 2; 1538.17; 449; 90 3; 3146.04; 484; 182 "Sales Chart2" button: First, the online sales and the offline_sales of all notebooks are calculated. With these two totals, a vertical bar chart is created that compares the total sales figures online and offline. The diagram is output in a new window.

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

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

Students also viewed these Databases questions