You will write three functions that find the start of a gene, translate an mRNA and say what a change of one base does. The table of the genetic code is made for you at the top of the program, and the amino acids are written with one letter, M for methionine and so on.
The idea. A ribosome starts at the first AUG, reads three bases at a time and stops at a stop codon, which is * in the table.
Your tasks.
translate. It gives the amino acids, as a string, from the first AUG to the stop codon. The stop codon is not included. If there is no AUG, it gives an empty string.classify. It compares an old codon and a new codon, and gives "silent", "missense" or "nonsense".changes. It counts how many of the 9 changes of one base in a codon are silent, missense and nonsense, and gives them as a dictionary.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…
With Standard, you also open 12 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.