class V(object):
def baudu(self, start, end):
sushu = []
for i in range(start, end + 1):
for j in range(2, i):
if i % j == 0:
break
if i == j + 1:
sushu.append(i)
ten = []
for p in range(1, len(sushu)):
ten.append(sushu[p])
if p % 10 == 0:
print(ten)
return "DONE!"
if __name__ == "__main__":
# !/usr/bin/python
# -*- coding:UTF-8 -*-
# 求素數
kaishi = 100
jieshu = 200
nums = V()
print(nums.baudu(start=kaishi, end=jieshu))
class V(object):
def baudu(self, start, end):
sushu = []
for i in range(start, end + 1):
for j in range(2, i):
if i % j == 0:
break
if i == j + 1:
sushu.append(i)
ten = []
for p in range(1, len(sushu)):
ten.append(sushu[p])
if p % 10 == 0:
print(ten)
ten = []
return "DONE!"
if __name__ == "__main__":
# !/usr/bin/python
# -*- coding:UTF-8 -*-
# 求素數
kaishi = 100
jieshu = 200
nums = V()
print(nums.baudu(start=kaishi, end=jieshu))