@@ -0,0 +1,879 @@
+def genPrimes():%0A    p = %5B%5D%0A    x = 1%0A    while True:%0A        check = 1%0A        x += 1%0A        for i in p:%0A            if x %25 i == 0:%0A                check = 0%0A                break%0A        if check == 1:%0A            p.append(x)%0A            yield x%0A    %0A# --Sample Test START--%0Aa = genPrimes()%0Aprint a.next()%0Aprint a.next()%0Aprint a.next()%0Aprint a.next()%0A# --Sample Test START--%0A%0A# --Alternative START--%0A# Note that our solution makes use of the for/else clause, which %0A# you can read more about here:%0A# http://docs.python.org/release/1.5/tut/node23.html %0A%0A# def genPrimes():%0A#     primes = %5B%5D   # primes generated so far%0A#     last = 1      # last number tried%0A#     while True:%0A#         last += 1%0A#         for p in primes:%0A#             if last %25 p == 0:%0A#                 break%0A#         else:%0A#             primes.append(last)%0A#             yield last%0A%0A# --Alternative END--

add genPrime.py