I am new to python so forgive me if my vocabulary isn't correct. I have a homework assignment where I need to enter a DNA sequence that is a multiple of three, has a start codon, and a stop codon. So far it's going fairly well but I am stuck on a couple of issues. I added "or" operators in the stop codon section since there are three acceptable inputs, however, I still receive the print message "sequence does not include a valid start codon". The other thing I want to be able to do is to have the program go back to the original input if the sequence does not meet the criteria. Currently it outputs the mRNA and protein anyways. See pictures and code below.
Thanks
from Bio.Seq import Seq
DNA_text = raw_input("Please enter a DNA sequanece that is a valid ORF\n")
DNA = Seq(DNA_text)
print("You have entered the following DNA sequence: " + DNA)
while DNA[0:3] != "ATG":
print ("Sequence does not include a valid start codon")
break
while DNA[-3:len(DNA)] != "TAA"or"TAG"or"TGA":
print ("Sequence does not include a valid stop codon")
break
while len(DNA) %3 != 0:
print ("Sequence is not a valid reading frame")
break
mRNA = DNA.transcribe()
protein = mRNA.translate()
print("mRNA: " + mRNA)
print("protein: "+ protein)