title: Fix beginner's code used to formulate a list of primes
body: <p>The code results in the list being appended with odd numbers instead of prime numbers. If the odd number is not divisible by 3, then the list will generate the particular number at least 3 times:</p>
  
  <pre><code>for i in range(2,100):
      for x in range(2,i):
          if (i %x==0):
              break
          else:
              prime.append(i)
          print(prime)
  </code></pre>
  
  <p>I expected to generate one list of prime numbers ranging from (2, 100). However the actual output is:</p>
  
  <pre><code>...
  [3, 5, 5, 5, 7, 7, 7, 7, 7, 9]
  [3, 5, 5, 5, 7, 7, 7, 7, 7, 9, 11]
  [3, 5, 5, 5, 7, 7, 7, 7, 7, 9, 11, 11]
  ...
  </code></pre>