Question: You are given a small text file data.txt containing financial data. Your job is to write a program to read in this text file containing

You are given a small text file data.txt containing financial data. Your job is to write a program to read in this
text file containing data and print out its information in a clear, human-readable fashion.
You will use indexing (maybe slicing), string methods, file input, string-to-numerical conversions and Python
string formatting (as well as concepts learned in past weeks).
Your program is required to do the following:
Ask for a filename to open for reading.
Open the file using the given filename, and then read in the text file. It has a specific format:
Line 1 always has the format principal
You are given a small text file data.txt

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 Programming Questions!