Question: Exercise 2: Transcribing DNA to RNA Compose a function dna2rna which accepts a DNA string dna and returns a string rna containing the RNA strand

Exercise 2: Transcribing DNA to RNA Compose a function dna2rna which accepts a DNA string dna and returns a string rna containing the RNA strand corresponding to its DNA input. That is, the input 'ACGT' should return 'UGCA'. The function should convert any input into upper-case. #grade def dna2rna(dna): rna = for symbol in dna: if symbol == 'A': rna = rna + 'U' elif symbol == 'T': return rna # Here are some DNA strings you can test your function with. dnao = 'TGCA' rnao = 'ACGU' dna1 = 'ITTGTCTAGTGGGCGACTCGCCCAATAGACAACGGTTT' rnal = 'AAACAGAUCACCCGCUGAGCGGGUUAUCUGUUGCCAAA
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
