im having trouble writing a program that finds all prime numbers to a n'th number and prints them. Heres what I have so far, if someone could help and explain what im doing wrong, it would be appreciated:
def isPrime (n):
primeList = [2]
for i in range (3, n):
if n%2 == 0 or n%3 == 0:
break
else:
primeList.append(i)
break
return (primeList)