Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Step by Step Solution

3.59 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Program 1 def readfilemylist open text filefp opennamestxtr now read each linefor lines in fp now re... 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

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Programming questions

Question

What are the advantages of using a client/server approach?

Answered: 1 week ago

Question

Define operational feasibility.

Answered: 1 week ago

Question

8.4 Identify common stages in the pathway to addiction.

Answered: 1 week ago