41 is prime number

43 is a prime number

47 is a prime number

.

.

.

1681 is not a prime number

.

.

.

etc.

my code is only showing the last number in the range, 100. It shows 10141 is a prime number. How do I make it show all numbers? Thanks

- Code: Select all
`for i in range(101):`

i**2 + i + 41

if (i**2 + i + 41 % i) == 0:

print(i**2 + i + 41,"is not a prime number")

else:

print(i**2 + i + 41,"is a prime number")