Question: Files Purpose: To practice using the input ( ) function and begin using files for input and output. Instructions: Start IDLE, Choose File - >

Files
Purpose:
To practice using the input() function and begin using files for input and output.
Instructions:
Start IDLE, Choose File->New File and write a program that foes the following:
For all files, assume they are in the same directory as the python program. Because of
this, you do not need to use a path, just the name of the file.
o Ask the user for the name of 2 input files and open them for reading. They must
exist.
o Ask the user for the name of 1 output file and open it to append.
o Read the contents of input file 1 and input file 2.
o Write the contents of input file one to the output file.
o Write the contents of input file two to the output file (this is why we are
appending).
o Close all three files.

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