-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4.29.py
More file actions
39 lines (31 loc) · 730 Bytes
/
Copy path4.29.py
File metadata and controls
39 lines (31 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 29 00:51:47 2018
@author: Administrator
"""
from collections import Iterable
document = open("test.txt", "w+")
isinstance(document, Iterable)
def test():
print("test")
print(test())
def isPrime(n):
for index in range(2,n):
if (n % index) == 0:
return False
return True
def printPrim():
list1 = ""
count = 0
line = 1
for index in range(100, 301):
if count == 8:
print(list1)
print("----"+str(line)+"----")
list1 = ""
count = 0
line += 1
if isPrime(index) == True:
list1 += " " + str(index)
count += 1
printPrim()