Question: Python!! I am trying to find a stop codon within a string of DNA 1.) run down the string If there is no stop codon

Python!!

I am trying to find a stop codon within a string of DNA

1.) run down the string

If there is no stop codon return "no stop"

if there is a codon return the index of the first letter of the codon

(stop codons are ATG, TAA, and TAG)

This is my code so far but I doesnt print anything:

def stopping():

myDNA = input("Enter a string of DNA: ")

for j in myDNA:

j = 0

thisCodon = myDNA[j: j+3]

stop = ((thisCodon == 'TAA') or (thisCodon == 'TAG') or (thisCodon == 'TGA'))

while j <= j-3 and not stop:

hasStop = False

j = j + 1

print("-1")

if thisCodon == stop:

hasStop = True

return myDNA[j]

Run these two strands through the code:

TTTAAAGGGAAA (no stop codon)

TTTAAATAGGGG (stop codon at index 6]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!