Question
Python3 (3) DNA and RNA: DNA is housed within the nucleus of our cells. It controls cellular activity by coding for the production of proteins.
Python3
(3) DNA and RNA:
DNA is housed within the nucleus of our cells. It controls cellular activity by coding for the production of proteins. The information in DNA is not directly converted into proteins but must first be copied into RNA. This ensures that the information contained within the DNA does not become tainted.
DNA transcription is the process that involves transcribing genetic information from DNA to RNA. The transcribed DNA message, or RNA transcript, is used to produce proteins.
Write a function, transcribe, which has one parameter, a string S, which will have DNA nucleotides (capital letter As, Cs, Gs, and Ts). There may be other characters, too, though they will be ignored by the transcribe function -- these might be spaces or other characters that are not really DNA nucleotides. Then, transcribe should return as output the messenger RNA that would be produced from that string S. The correct output simply uses replacement:
'A's in the input become 'U's in the output. 'C's in the input become 'G's in the output. 'G's in the input become 'C's in the output. 'T's in the input become 'A's in the output. Any other input characters should not appear in the output.
Test your code using the following examples:
>>> transcribe('ACGT TGCA')
'UGCAACGU'
>>> transcribe('GATTACA')
'CUAAUGU'
>>> transcribe('GAtTtTACA') # data may need to be cleaned up a bit 'CUAAUGU' >>> transcribe('cs5') # lowercase doesn't count ''
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started