Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Programming. Program 1- Tea Leaves Sales Report 1. Here is the sample of the text file (datafile) for the tea sales (tea.txt). You have

Python Programming.

image text in transcribed

Program 1- Tea Leaves Sales Report 1. Here is the sample of the text file (datafile) for the tea sales (tea.txt). You have to create this file yourself Green Tea 8580.0:7201.25:8900.0 Earl Grey:10225.25:9025.0:9505.0 Ceylon:6700.1:5012.45:6011.0 Jasmine:9285.15:8276.1:8705.0 Mint Tea:7901.25:4267.0:7056.5 The data reads as follows -tea_name:store1_Sales store2_Sales:store3_Sales 2. The output displayed as follows: Ceylon Earl Grey Green Tea Jasmine Mint Tea 6700.10 5012.45 6011.00 17723.55 10225.25 9025.00 9505.00 28755.25 8580.00 7201.25 8900.00 24681.25 9285.15 8276.10 8705.00 26266.25 7901.25 4267.00 7056.50 19224.75 42691.75 33781.80 40177.50 392 The last row is the store totals for all the kinds of tea leaves sold. The last column is the total sale for each kind of tea leaves sales. 3. 4. Write a program to read in the tea txt textile and then print the report as shown in #2 above You must use dictionary. You can also use list, tuples, sets if necessary

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

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions