Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 PYTHON Lesson Files a) Download from Blackboard the input file named TicketSales.cv and place in into the same directory your source code is

Question 4 PYTHON
Lesson Files
a) Download from Blackboard the input file named
TicketSales.cv and place in into the same directory your
source code is in. It is a CSV file with each record
representing 1 Broadway Show with four (4) fields:
ShowTitle, OrchestraTickets, Orchestralncome,
MezzanineTickets, and Mezzaninelncome. The ShowTitle
field represents a string; the OchestraTickets and
Mezzanine Tickets represents an integer number of tickets
sold; and Orchestralncome and Mezzanineincome
represents a float dollar amount of value of tickets sold.
b) Loop / Read the records in the file creating a dictionary for
each record reading all the fields. Convert the Tickets and
Income fields to Integers and Real Numbers.
c) Total the OrchestaTickets, Orchestralncome,
MezzanineTickets and Mezzanine fields for all
Records shows.
01 n5 975373 (0 R
d) Output each Show's Information
e) Output the Total Information
Output :
Broadway Show
Alladin
Hamilton
Wicked
Almost Famous
Total
Orch Tickets Orch Income
300
300000.00
420
420000.00
400
360
1480
400000.00
360000.00
1080000.00
Mezz Tickets Mezz Income
250
200000.00
400
360000.00
200
300
180000.00
300000.00
1150
1040000.00
image text in transcribed
Lesson Files a) Download from Blackboard the input file named TicketSales.csv and place in into the same directory your source code is in. It is a CSV file with each record representing 1 Broadway Show with four (4) fields: ShowTitle, OrchestraTickets, Orchestraincome, MezzanineTickets, and Mezzaninelncome. The ShowTitle field represents a string; the OchestraTickets and MezzanineTickets represents an integer number of tickets sold; and Orchestralncome and Mezzaninelncome represents a float dollar amount of value of tickets sold. b) Loop / Read the records in the file creating a dictionary for each record reading all the fields. Convert the Tickets and Income fields to Integers and Real Numbers. c) Total the OrchestaTickets, Orchestralncome, MezzanineTickets and Mezzanine fields for all Records/shows. d) Output each Show's Information e) Output the Total Information

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

Database And Expert Systems Applications 23rd International Conference Dexa 2012 Vienna Austria September 2012 Proceedings Part 1 Lncs 7446

Authors: Stephen W. Liddle ,Klaus-Dieter Schewe ,A Min Tjoa ,Xiaofang Zhou

2012th Edition

3642325998, 978-3642325991

More Books

Students also viewed these Databases questions