Create a function named readfile which opens the existing file names.txt in the Python Files directory....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a function named readfile which opens the existing file names.txt in the Python Files directory. Read in all names, sort them, and then print them out to the screen. (Note: There may be several ways to print the sorted names to the screen.) Take a screenshot of your program and another screen shot of your output. Make sure you show the title bar of the program (which displays the path to your file) and the system time and date in the lower right corner of the VCASTLE window. Create a second function called writefile that will take the sorted output from readfile and write back to sorted_names.txt. It doesn't matter whether you output to the screen. The important thing is that you write information to the sorted_names.txt file. Add a third function called appendfile that will add a line showing your student ID to the bottom of the sorted output from the writefile function. In other words, it will append one line to the sorted_names.txt file. Take a screenshot of your completed program and another of your output. In this case, your output is the contents of the sorted_names.txt file. Create a function named readfile which opens the existing file names.txt in the Python Files directory. Read in all names, sort them, and then print them out to the screen. (Note: There may be several ways to print the sorted names to the screen.) Take a screenshot of your program and another screen shot of your output. Make sure you show the title bar of the program (which displays the path to your file) and the system time and date in the lower right corner of the VCASTLE window. Create a second function called writefile that will take the sorted output from readfile and write back to sorted_names.txt. It doesn't matter whether you output to the screen. The important thing is that you write information to the sorted_names.txt file. Add a third function called appendfile that will add a line showing your student ID to the bottom of the sorted output from the writefile function. In other words, it will append one line to the sorted_names.txt file. Take a screenshot of your completed program and another of your output. In this case, your output is the contents of the sorted_names.txt file.
Expert Answer:
Answer rating: 100% (QA)
Program 1 def readfilemylist open text filefp opennamestxtr now read each linefor lines in fp now re... View the full answer
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
Barry and Gary have an Uncle Larry. When Barry was born, Uncle Larry gave him 100 shares of stock in GTX Corp, the price of the stock was $10.00/share, and it has returned 8% annually. Uncle Larry...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Compare the similarities and differences of various models of workers representation exist in Japan and USA?
-
The United Arab Emirates (UAE) is unique in that expatriates constitute more than 80 per cent of the population. As the country continues to grow and accept foreigners at an astounding pace, Emiratis...
-
Eskimo Pie Corporation markets a broad range of frozen treats, including its famous Eskimo Pie ice cream bars. The following items were taken from a recent income statement and balance sheet. In each...
-
Show that By comparing the integrand to a simpler function 10
-
Explain why you cannot cause Earth to accelerate very much, even if you jump up and down on it.
-
What potential sources of error might be associated with the following situations? a. In a survey of frequent fliers age 50 and older, researchers concluded that price does not play a significant...
-
In the year 2009, Anytown, Colorado has a population of 30,000. Use the model p = 30e 0.0198026273t to predict the population of Anytown in the year 2015. Include units of measurement, i.e. people or...
-
The trial balance of Garvey, Inc., at September 30, 2012, does not balance: The accounting records hold the following errors: a. Recorded a $100 cash revenue transaction by debiting Accounts...
-
Use the financial statements effects template to show the effects on the 2017 financial statements of the recording of: the plan amendment pension expense the liability gain the asset loss...
-
A 1600-kg car traveling with a velocity of 23 m/s north collides head-on with a 3200-kg truck traveling with a velocity of 12 m/s south. Immediately after the collision, the velocity of the car is 5...
-
a. A relatively poor country with wide, beautiful beaches bordering warm ocean water can produce two goods: tourism and agricultural products (food, cotton, etc). Lets call it Beautiful Island, BI....
-
As the Facility Manager you are developing a high visibility project. What task is necessary to ensure the successful completion of the project? B. Manage the expectations of stakeholders to assure...
-
IIn a leased building, there has been a recent increase in complaints of items stolen from the workplace. A majority of the complaints concern missing staplers, tape, and hole punches from the copier...
-
You manage a corporate office facility. The occupants are top management and their staff. In addition to the regular routines of housekeeping, maintenance, etc., many requests are made from the CEO's...
-
The cash flows for three different alternatives are given in table below. If MARR is set at 8%, determine which is the best alternative? (Please show work in order to be rated): Data Alt. X Alt. Y...
-
The outer loop controls the number of students. Note that the inner loop of this program is always executed exactly three times, once for each day of the long weekend. Modify the code so that the...
-
Speedy Spuds is a fast-food restaurant offering all kinds of potatoes. The manager has a 30-second rule for serving customers. Servers at the counter say they could achieve that rule if the form they...
-
What are the advantages of using a client/server approach?
-
Define operational feasibility.
-
Two radio stations have the same power output from their antennas. One broadcasts AM at a frequency of \(1000 \mathrm{kHz}\) and one broadcasts FM at a frequency of \(100 \mathrm{MHz}\). Which...
-
A paramecium is covered with motile hairs called cilia that propel it at a speed of \(1 \mathrm{~mm} / \mathrm{s}\). If the paramecium has a volume of \(2 \times 10^{-13} \mathrm{~m}^{3}\) and a...
-
Photon P in Figure Q28.35 moves an electron from energy level \(n=1\) to energy level \(n=3\). The electron jumps down to \(n=2\), emitting photon \(\mathrm{Q}\), and then jumps down to \(n=1\),...
Study smarter with the SolutionInn App