Write a program to display all prime numbers within a range defined by the user as input
minValue=int(input())
maxValue=int(input())
for number in range(minValue,maxValue):
is_prime=True
if number > 1:
for i in range(2, number):
if (number % i) == 0:
is_prime=False
break
if is_prime:
#Display prime number
print(str(number))
Comments
Leave a comment