- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
Latest commit
23 lines (15 loc) · 418 Bytes
/
Copy pathmain.py
File metadata and controls
23 lines (15 loc) · 418 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
#
num=int(input("enter the number"))
flag=False
ifnum>1:
foriinrange(2,num):
if(num%i)==0:
flag=True
break
ifflag:
print(num, "is not a prime number")
else:
print(num,"is a prime number")
# See PyCharm help at https://www.jetbrains.com/help/pycharm/