Advanced List Exercises 2

You might also like

You are on page 1of 1

Advanced List Exercises 2¶

### START FUNCTION

def amino_acids(mrna):

# your code here

protein = []

translation = {'AUG': 'Met', 'CCA': 'Pro', 'CCU' :'Pro'}

stop_codons = {"UGA"}

while mrna:

codon = mrna[:3]

mrna = mrna[3:]

if codon in stop_codons:

break

amino_acid = translation[codon]

protein += amino_acid

return protein

### END FUNCTION

print (amino_acids('AUGCCACCUUGA'))

You might also like