Question: Exercise 5: Mapping a String of Triplets to Codons Compose a function rna2codons which accepts a string of three-letter codons triplets and returns a string

 Exercise 5: Mapping a String of Triplets to Codons Compose a

Exercise 5: Mapping a String of Triplets to Codons Compose a function rna2codons which accepts a string of three-letter codons triplets and returns a string amino representing the set of corresponding amino acids per the table above. That is, the input 'GAUUAUUCC' should return 'DYS'. The function should convert any input into upper-case and should check that each codon is valid. The tricky part is figuring out how to get a string chopped into three-letter chunks. (This is harder than it seems at first.) There are many ways you can think of to do this. One possibility: example_string = 'abcdefghijklmnopqrstuvwxyz' for i in range( 0, int( len( example_string ) / 3)): print( example_string[ 3*1:3*i+3 ] ) #grade def rna2codons (triplets): Exercise 5: Mapping a String of Triplets to Codons Compose a function rna2codons which accepts a string of three-letter codons triplets and returns a string amino representing the set of corresponding amino acids per the table above. That is, the input 'GAUUAUUCC' should return 'DYS'. The function should convert any input into upper-case and should check that each codon is valid. The tricky part is figuring out how to get a string chopped into three-letter chunks. (This is harder than it seems at first.) There are many ways you can think of to do this. One possibility: example_string = 'abcdefghijklmnopqrstuvwxyz' for i in range( 0, int( len( example_string ) / 3)): print( example_string[ 3*1:3*i+3 ] ) #grade def rna2codons (triplets)

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!