Waived!

Objective read names from two different files into your program and write each name to a single new

(2 customer reviews)

Original price was: $10.00.Current price is: $5.00.

Download button will appear immediately after successful payment.

Full support will be provided with necessary files installation.

Get impeccable customized solution within 24 hours, hassle-free.

View Details
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.
Instant
Download

Description

Objective:

Read names from two different files into your program and write each name to a single new file.

Please make sure you download the namelist1.txt & namelist2.txt input files from the assignment page in Canvas and place them in the same folder as your program.

– Input files:

– nameslist1.txt & nameslist2.txt

– Each file contains a list of 200 unique names.

– Output file:

– Output all names to an output file called allnames.txt

Write a program that reads the names from the two input files and writes the names to the two output files:

a. Ask the user to input the file name and path of the first input file.

i. Use a try/except block to open all input before processing.

ii. If the file cannot be opened, display the appropriate error message and require the user to reenter the file name and path.

iii. Continue looping until the user has entered a valid file name and path.

b. Ask the user to input the file name and path of the second input file.

i. Use a try/except block to open all input before processing.

ii. If the file cannot be opened, display the appropriate error message and require the user to reenter the file name and path.

iii. Continue looping until the user has entered a valid file name and path.

c. Ask the user to input the file name and path of the output file.

i. Use a try/except block to open all input before processing.

ii. If the file cannot be opened, display the appropriate error message and require the user to reenter the file name and path.

iii. Continue looping until the user has entered a valid file name and path.

d. Processing:

i. Use a try/except block to read from the input files and write to the output file.

ii. Read all the names from one input file at a time. Write the names to the output file.

– You must use a while loop to process the first input file (nameslist1.txt) and write to the output file.

– You must use a for loop to process the second input file (nameslist2.txt) and write to the output file.

iii. Each line in each input file is one name.

iv. Each name must be written on a separate line in the output file.

v. There must be no blank lines between names in the output files.

e. All input files and the output file must be closed after all names have been processed.

Rubric:

The rubric is located on the assignment page in Canvas. Please review the rubric to make sure you meet all of the requirements for this lab.

Screen Shot:

Enter the path and name of the first file: c:test Terr.txt

Error: file(s) not found, or could not be opened

Please reenter

Enter the path and name of the first file: c:testnameslist1.txt

Enter the path and name of the second file: c:testerr.txt

Error: file(s) not found, or could not be opened

Please reenter

Enter the path and name of the second file: c:testnameslist2.txt

Enter the path and name of the output file: c:testallnames.txt

Names processing started

Names processing complete


2 reviews for Objective read names from two different files into your program and write each name to a single new

  1. Christina Martini

    Work was finished long before due and tutor was considerate and engaging. Perfect!

  2. Jed Friend

    Thanks a lots, I really appreciate your effort it is an excellent report.

Only logged in customers who have purchased this product may leave a review.


You may also like…

Patron Details

Additional information

Your Solution

Product
Quantity
Total
Cart Subtotal $0.00
Order Total $0.00

  • Pay with your credit card.