forked from hacktoberfest17/programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#This Scripts will allow to count prime numbers between two integers | ||
|
||
# Taking input from the users | ||
min = int(input("Enter minumum number: ")) | ||
max = int(input("Enter maximum number: ")) | ||
count = 0 | ||
|
||
for num in range(min, max+1): | ||
if num > 1: | ||
for a in range(2, num): | ||
if (num % a) == 0: | ||
break | ||
else: | ||
# If you want to print prime numbers between two integers then comment out the next line | ||
#print(num) | ||
count += 1 | ||
print('Total Number: ', count) |