Getting Run Error

Hi ,
as i checked my code is running fine when i am providing the inputs manually.

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)

Still i am getting RUN error message while submitting it.

any light on this.

Hey @aditya.ameya, can you please share a screenshot of the error with me ?

Thanks ! :slightly_smiling_face:

yes pfb

when i am providing custom inputs its getting executed successfully


but as soon as i am trying submit , i am getting run error

Hey @aditya.ameya, please see if you have followed the correct input and output format. You have taken the input of 2 numbers in different lines, whereas the input format specified in the question is like this :

2
1 10
3 5

And the sample output is also printed in a single line for every test case like this :

2 3 5 7
3 5

I hope you understand that it is very important to follow the input and output format as given in the question.

I hope this clears your doubt ! :+1:
Happy Learning ! :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.