id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > mark
prev  |  next  |  chance

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)

def mark(dna):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy