Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions