Ad

This is a first experiment of mine in generating primes. Theoretically, with enough calculating power and storage space you could find primes indefinitely. I cribbed some of the guts from another work and justled them around a bit. Advice welcome.

def primemaker(x):
    primes = []
    isprime = True
    for possibleprimes in range(2,x):
        for n in range(2,possibleprimes):
            if possibleprimes % num == 0:
                isprime = False
        if isprime:
            primes.append(possibleprimes)
    print(primes)