Question: Help python solution for the last question Get summarised data Prompt and read the type of data (0-restock, 1-make, 2-outstanding) the summary is for. Then,

Help python solution for the last question

Get summarised data

Prompt and read the type of data (0-restock, 1-make, 2-outstanding) the summary is for.

Then, open a file transactions.txt with an appropriate file mode, to produce the summarized report, sorted by quantity followed by either by part or product code.

Example runs

Assume the following 12 lines are in transactions.txt:

make ABBB 2

make ABBC 2

make ABBB 1

outstanding ABBB 1

restock E 60

restock F 10

restock A 60

make ABBC 12

make ABBB 2

make ABBB 2

outstanding ABBB 2

restock F 10

Run 1

0-restock, 1-make, 2-outstanding. Enter choice: 0

Summarised Data for RESTOCK ***

A 60

E 60

F 20

Run 2

0-restock, 1-make, 2-outstanding. Enter choice: 1

Summarised Data for MAKE ***

ABBC 14

ABBB 7

Run 3

0-restock, 1-make, 2-outstanding. Enter choice: 2

Summarised Data for OUTSTANDING ***

ABBB 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!