Skip to content

Instantly share code, notes, and snippets.

@ysnerdem
Created November 3, 2017 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ysnerdem/b607e8b32236401f0dcc0eeb9ba54c2d to your computer and use it in GitHub Desktop.
Save ysnerdem/b607e8b32236401f0dcc0eeb9ba54c2d to your computer and use it in GitHub Desktop.
print("Determine the range of prime numbers you want to find")
num_1 = int(input("Lower limit:"))
num_2 = int(input("Upper limit:"))
print("Prime numbers between", num_1, "and", num_2)
for i in range(num_1, num_2 + 1):
if i > 1:
for num in range(2, i):
if (i % num) == 0:
break
else:
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment