Question: USING PYTHON What if we needed to reverse strings for other purposes? Or complement DNA bases for other reasons? Let's encapsulate the processes of reversing

USING PYTHONUSING PYTHON What if we needed to reverse strings for other purposes?

What if we needed to reverse strings for other purposes? Or complement DNA bases for other reasons? Let's encapsulate the processes of reversing and complementing into two separate functions and use those to write a third function. Read the specifications carefully. The first should be called complement and should take a string of length 1, that is, a single character, as an argument (call the argument base). It should convert the string to uppercase, and then return the complement as a string that is a single character, assuming that the input is alphabetic only - non-ACGT characters should return N. The second should take a string as an argument and return the reverse of the string. Call this function reverse and the argument to_reverse. This string could have any content and may not be just DNA sequence. The third function should be called rev_comp_deux and should make use of the complement and reverse functions to create the reverse complement of a DNA sequence. It should take one argument, a DNA sequence as a string, called DNA_seq. It should return the reverse complement string

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!