We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e88c7f7 commit 83b69abCopy full SHA for 83b69ab
Week-2-Assignment.py
@@ -0,0 +1,35 @@
1
+def primeproduct(m):
2
+ l=[]
3
+ if m>=2:
4
+ for i in range(2,m):
5
+ if m%i==0:
6
+ l+=[i]
7
+ if len(l)==2:
8
+ if m==l[0]*l[1]:
9
+ if l[1]%l[0]==0:
10
+ return False
11
+ return True
12
+ elif len(l)==1:
13
+ if m==l[0]*l[0]:
14
15
+ else:
16
17
18
19
+
20
+def delchar(s,c):
21
+ if len(c)==1:
22
+ s=s.replace(c,'')
23
+ return (s)
24
25
26
27
+def shuffle(l1,l2):
28
+ c=[]
29
+ if len(l1)!=0 and len(l2)!=0:
30
+ for i in range(min(len(l1), len(l2))):
31
+ c.extend([l1[i],l2[i]])
32
+ c.extend(l1[i+1:] or l2[i+1:])
33
34
+ c.extend(l1[0:] or l2[0:])
35
+ return (c)
0 commit comments