1个回答
展开全部
# coding=utf-8
class sushu():
def __init__(self,begin_num,end_num):
self.begin_num = begin_num
self.end_num = end_num
def excute_sushu(self):
sushu_list = []
for n in range(self.begin_num,self.end_num):
for i in range(2,n):
if n % i == 0:
print "数字%d不是素数" %n
break
else:
sushu_list.append(n)
return sushu_list
sushu = sushu(100,200)
print sushu.excute_sushu()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询