求助
4.请写出下列程序的功能。import mathn=O
for m in range(101,201,2):
k=int(math.sqrt(m))
for i in range(2, k+2):
if m%i==O:
break
else:
if n%10==O:
print('\n')
print('%d'%m, end=' ')
n+=1
看不懂 求解答 import math
n = 0
for m in range(101,201,2):
k=int(math.sqrt(m))
for i in range(2, k+2):
if m % i == 0:
break
else:
if n % 10 == 0:
print('\n')
print('%d'%m, end=' ')
n += 1
这是求素数的程序
是0不是o
页:
[1]