Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Now let s put together the program. Open the Python IDLE program and create a new program called _ PA 3 1 in this Window

Now lets put together the program. Open the Python IDLE program and create a new program called _PA31 in this Window
Print your studentID to the screen
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 doesnt 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

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions