Answered step by step
Verified Expert Solution
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 PA 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 sortednames.txt It doesnt matter whether you output to the screen. The important thing is that you write information to the sortednames.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 sortednames.txt file.
Take a screenshot of your completed program and another of your output. In this case, your output is the contents of the sortednames.txt file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started