title: Codon count on a given mrna sequence in python
body: <p>This is the code that I have been trying to use but it does not work properly:</p>
  
  <pre><code>mrna = input("Please enter mRNA sequence: ")
  start = mrna.find('AUG')
  if start != -1:
      while start + 2 &lt; len(mrna):
          codon = mrna[start:start + 3]
          if codon == "UAA": 
              break
          print(codon)
          start += 3
  </code></pre>
  
  <p>Expected start codon: <strong>AUG</strong></p>
  
  <p>Expected stop codon: <strong>UAA</strong> or <strong>UAG</strong> or <strong>UGA</strong>
  If for example: </p>
  
  <pre><code>input = "AUGUGA"
  output = 1
  
  input = "GAGAUGUUGGUUUAA"
  output = 3
  </code></pre>
  
  <p>I don't really know what's wrong.</p>