Question: Python File IO Write a Python program that reads a data file called ticket.txt. The data file contains ticket IDs and ticket prices. You can

Python File IO

Write a Python program that reads a data file called ticket.txt. The data file contains ticket IDs and ticket prices. You can create the file manually by using any of a text editor such as notepad or textpad tool. Your program should read these tickets and prices; find minimum, maximum and average ticket prices and output the report into a file called output.txt. The report file should look exactly (or better than) the one shown below.

Below is the content of file ticket.txt file:

Ticket Price

A31 149.99

B31 49.99

A41 179.99

F31 169.99

A35 179.99

A44 169.99

Below is the content of the output.txt file:

*******************************************

TICKET REPORT

*******************************************

There are 6 tickets in the database.

Maximum Ticket price is $179.99.

Minimum Ticket price is $49.99.

Average Ticket Price is $XXX.XX.

Thank you for using our ticket system!

***************************

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!