The compiler keeps throwing an error, whereas the code seems to work fine in other IDEs.
Here’s the code:
testcases = int(input())
while(testcases!=0):
lower_limit = int(input())
upper_limit = int(input())
i, j, flag = 0, 0, 0
for i in range(lower_limit, upper_limit+1):
if(i==1):
continue
flag = 1
for j in range(2, i//2 + 1):
if(i%j==0):
flag = 0
break
if(flag==1):
print(i, end=" ")
print("\n")
testcases -= 1

