Prime generator Problem

if name==“main”:
t=int(input())
for k in range(t):
m,n=list(map(int,input().split()))
for num in range(m,n+1):
if num>1:
for i in range(2,num):
if (num%i)==0:
i+=1
break
else:
print(num,end=" ")
break
else:
break

where is the problem in this code??

Hello @mhtydv1404,
Kindly share the code through coding blocks IDE.
Thanks :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.