If n is divisible by any of the numbers then it is not a prime number. If a number is prime, print it.
for num in range(2,101):
prime = True
for i in range(2,num):
if (num%i==0):
prime = False
if prime:
print (num)
Here is a much shorter and efficient way:
for num in range(2,101):
if all(num%i!=0 for i in range(2,num)):
print (num)
I hope this helps.