I am getting run error hen i try to submit this code in python3

def isprime(num):
for n in range(2,int(num**1/2)+1):
if num%n==0:
return False
return True

t=int(input())
for i in range(t):
a=int(input())
b=int(input())

while a<b+1:
    if isprime(a):
        print(a , end=" ")
        a=a+1
    else:
        a=a+1
print("")

Hi @amangupta
please refer the following code :


Hope this might help :slightly_smiling_face:

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.