Question: 1. Write a Python script that will read two files of data (e.g. two sequence files in FASTA format) and print, to the standard output,

 1. Write a Python script that will read two files of
data (e.g. two sequence files in FASTA format) and print, to the

1. Write a Python script that will read two files of data (e.g. two sequence files in FASTA format) and print, to the standard output, the contents of the second followed by the contents of the first. ("First" and "second" are defined by the order in which the files are opened within the script.) Have the file names "hard coded" within the program. Use the try and except constructs to handle an error when the file is opened (e.g. because it doesn't exist). See if the construct works when you test your script. Modify your script from Question 1 so that the user is prompted for the names of the two input files (and then the files specified by the user at runtime are read and their contents printed). Again the content of the second file must be printed before the content of the first Have your script gracefully handle the case that one of the files does not exist. Further, make sure to test this case

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!