Skip to content

Commit 8c83e97

Browse files
authored
Merge pull request #162 from Ritax2003/patch-5
code.py
2 parents 2bd55cf + 7966143 commit 8c83e97

File tree

1 file changed

+21
-0
lines changed
  • S/Split a list into nonprime & prime

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
n=int(input("ENTER THE SIZE OF THE list1"))
2+
p=[]
3+
np=[]
4+
l=[]
5+
o=[]
6+
f=0
7+
print("Enter the no.s")
8+
for i in range(0,n):
9+
e= int(input())
10+
for j in range(1,n):
11+
if(e%j==0):
12+
f+=1
13+
if(f==1):
14+
p.append(e)
15+
else:
16+
np.append(e)
17+
f=0
18+
print("prime list")
19+
print(p)
20+
print("Non prime list")
21+
print(np)

0 commit comments

Comments
 (0)