输出2-100内的质数

p=[2] for n in range(2,101): for i in range(2,n): if n%i=0: break print(‘n=’,n,‘i=’,i) elif i=n-1: p.append(n) print(p)web
相关文章
相关标签/搜索