Skip to content

Commit

Permalink
Merge pull request Ishaan28malik#1569 from abhiramisa/patch-4
Browse files Browse the repository at this point in the history
Create prime.py
  • Loading branch information
Ishaan28malik authored Oct 31, 2020
2 parents b94f6cc + c29fa16 commit b8da439
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions DS&Algo Programs in Python/prime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
n = int(input("Enter a number: "))
for i in range(1, n+1):
count = 0
for j in range(1, n+1):
if i%j==0:
count= count+1
if count==2:
print(i)

0 comments on commit b8da439

Please sign in to comment.