In-Linear-Time: Check This Web Site
In-Linear-Time: Check This Web Site
https://stackoverflow.com/questions/2488889/how-can-i-merge-two-lists-and-sort-them-working-
in-linear-time
finalList = []
finalList.append(item)
finalList.append(item)
finalList.sort()
return finalList
translation = {"AUG": "Met", "CCA": "Pro", "CCU": "Pro"} # Which codon translates for which
amino acid
if codon in stop_codons:
return protein
Advanced List Exercises 2¶
Instructions to Students
Do not add or remove cells in this notebook. Do not edit or remove the ### START
FUNCTION or ### END FUNCTION comments. Do not add any code outside of the
functions you are required to edit. Doing any of this will lead to a mark of 0%!
Answer the questions according to the specifications provided.
def amino_acids(mrna):
aa_dict = {'CUU': 'Leu', 'UAG': '---', 'ACA': 'Thr', 'AAA': 'Lys', 'AUC': 'Ile',
'CCC': 'Pro', 'UAU': 'Tyr', 'GGU': 'Gly', 'UGU': 'Cys', 'CGA': 'Arg',
'CAG': 'Gln', 'UCU': 'Ser', 'GAU': 'Asp', 'CGG': 'Arg', 'UUU': 'Phe',
'UGC': 'Cys', 'GGG': 'Gly', 'UGA':'---', 'GGA': 'Gly', 'UAA': '---',
'ACG': 'Thr', 'UAC': 'Tyr', 'UUC': 'Phe', 'UCG': 'Ser', 'UUA': 'Leu',
'UUG': 'Leu', 'UCC': 'Ser', 'ACC': 'Thr', 'UCA': 'Ser', 'GCA': 'Ala',
'GUG': 'Val', 'GAG': 'Glu', 'GUU': 'Val', 'GCU': 'Ala', 'GAC': 'Asp',
count = 0
while True:
if mrna_list[count] == '---':
mrna_list = mrna_list[:count]
break
else:
count += 1
conversion_result = tuple(mrna_list)