-1
def primefactors():
    prime_list = []
    n = 600851475143
    for i in range(0, n):
        if i % n == 0:
            prime_list.append(i)
    return prime_list


print (primefactors())

I want to print out the numbers i have stored in prime_list

I dont get any errors but it dosnt print out anything..

mrfr
  • 1,724
  • 2
  • 23
  • 44

1 Answers1

0

It looks like you need to swap i and n here:

i % n

Though, this code won't give you the prime factors, just the numbers that your n is divisible by.

Ryan O'Donnell
  • 617
  • 6
  • 14