Problem Description
Write a program to find prime numbers between two range excluding the starting and ending number of given range
Input 1: Lower Range
Input 2: Upper Range
Output:
List of prime numbers
Refer sample input and output for formatting specification.CODING ARENA
lower=int(input())
upper=int(input())
for num in range(lower,upper + 1):
if num > 1:
for i in range(2,num):
if (num % i) == 0:
break
else:
print(num)
Test Case 1
Input (stdin)17
23Expected Output17
19
23Test Case 2
Input (stdin)11
31Expected Output11
13
17
19
23
29
31
✖
Share this Posts
Subscribe Our Newsletter
0 Comment
Post a Comment