about | help | code help+videos | done | prefs |
Write a function mark(dna) that returns a new DNA string in which every start codon ATG is replaced with >>>, and every stop codon (TAA, TAG, or TGA) is replaced with <<<. Your loop should increment by 3 in each iteration so that you are only considering non-overlapping codons. You may assume dna is all lowercase and that you always start at reading frame 0. You may want to read the ORF problem before this one. Do not assume that every opening >>> is followed by a closing <<< mark('atggaatgaccatcagtaa') → '>>>gaa<<<ccatcagtaa' mark('atggaatggaccatcaggtag') → '>>>gaatggaccatcagg<<<' mark('atgcccatggaatggaccatcaggtag') → '>>>ccc>>>gaatggaccatcagg<<<' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy