Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. (3 marks) Consider the regular expression you devised and tested for Canadian postal codes in Question 2. Using that regular expression, write a python

image text in transcribed
5. (3 marks) Consider the regular expression you devised and tested for Canadian postal codes in Question 2. Using that regular expression, write a python script that will prompt the user for a potential postal code, and respond back to the user stating whether of not the input is a Canadian postal code (and nothing else). The response is to include the postal code (on success) or the user input (on failure). Allow valid postal codes to be inpat using lowercase characters, as well as upper case. You are welcome to base your script on examples from class. Test your program with inputs that both satisfy the requirement of being a Canadian postal code, and input that does not. Show your script, and your testing, to the lab instructor. 4. (2 marks) Modify your script from the question above so that it checks all the command line arguments to see if they are valid Canadian postal codes. When testing your script, make sure to place the arguments (potential postal codes) in quotes if they contain space characters. (2 marks) Modify your script from Question 6 of last week's lab so that it writes the FASTA information into a file whose name is provided by the user after being prompted for it. Thus, the seript will need to be modified to initially prompt the user for the name of the output file, open the named file, write the FASIA recoed into the named file, and then close the output file. Remenber that a file is opened for output by Python's open function if the mode is specified as ' w '. Again you are welcome to base your script on examples from class. Run your seript, and have the output go to a file whose name is something other than yeast. fasta. Show your script to the lab instructor, and be prepared to demonstrate its operation. 1. (l mark) Write a Python Script that will re-generate the file yeast. fasta from Question 11 of last week's lab. Hint: use print statement(s). Then, using the diff or cmp commands, confirm that the file created in Question 7 above is the same as the content of file yeast, fasta. Show this evidence to the lab instructor. 9. (3 marks) Recall that a protein-encoding sequence begins with a START codon and ends with a STOP codon. Suppose the first 12 and the last 12 nucleotides of a protein-encoding DNA sequence, with the central part omitted, is TTAAGCATIT TG ... TT TGATATCCAT Based on this sequence and the standard genetic code table given in class or in Figure 1-11 on page 11 in the Momand \& McCurdy textbook, formulate answers to the following questions. a. Do the first 3 nucleotides of the given sequence represent a START codon? b. Do the last 3 nucleotides of the given sequence represent a STOP codon? c. Based on your answers to parts a and b and given that the sequence is known to code for a protein, is the sequence in question sense or anti-sense DNA? d. If your answer to part c is that the given sequence is anti-sense DNA, convert it into the corresponding portion of its sense DNA. If your answer to part c is that the given sequence is sense DNA, do not prowide any response for this question. e. Translate the sense DNA (the original sequence if you answered "sense" in part c, of your sequence in part d if you answered "anti-sense" in part c) into the corresponding amino acid sequence. Ignore the fact that only the beginning and end of the sequence are given; assume the two terminal portions constitute the entire sequence for the purposes of this

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

Students also viewed these Databases questions

Question

=+Show that un is finitely additive and countably subadditive on o.

Answered: 1 week ago

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago