We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74cd41c commit bca3497Copy full SHA for bca3497
Scripts/prime_numbers.py
@@ -0,0 +1,27 @@
1
+'''
2
+Created on Oct 15, 2019
3
+
4
+@author: Big
5
6
+n=int(input("write a number >0:"))
7
+ok=1
8
+if(n==0 or n==1):
9
+ ok=0
10
+else:
11
+ if(n%2==0):
12
+ if(n!=2):
13
14
+ else:
15
+ d=2
16
+ while(d<=n//2):
17
+ if(n%d==0):
18
19
+ break
20
+ if(d==2):
21
+ d=3
22
23
+ d+=2
24
+if(ok==1):
25
+ print("prime")
26
27
+ print("!prime")
0 commit comments