Python Challenge - Prime Number Finder

Hey, I had a question about your code. I’m having trouble understanding lines 5 and 6. I get that you’re taking i and finding the remainder after dividing j into. How is it that when you iterate through i and j you aren’t always getting the same numbers for i and j? (I’m not sure if I explained that well) What I mean is why isn’t always like 1 % 1, 2 % 2, and so on?

Hi I was wondering what the p = False, P= True and if p do in your code.

def prime_finder(n): if n < 2: return None else: ls=[] for i in range(2,n+1): x = 2 c = 0 while x < i : if i % x == 0: c +=1 x +=1 if c == 0: ls.append(i) return ls print(prime_finder(11))