0
How to code for print all prime numbers from 1to 10
2 Respostas
0
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
isPrime = True
for i in range(0, 9):
for k in range(2, 9):
if(k == x[i]):
continue
else:
if(x[i] % k == 0):
isPrime = False
if(isPrime == True):
print(x[i])
else:
isPrime = True;