Prime generator

help me in getting the input as mentioned
i am getting some value error.I am new in python .pleas help.here is my code

This is because when we give input as:

2
1 10
3 5

Than input() function takes whole line, so your n takes correct input but as soon as code enters in loop and the line k=int(input()) runs, it causes error, as “1 10” cannot be converted to string.
so use
line = input().split(" ")
k = int(line[0])
l = int(lint[1])

Hope this cleared your doubt. :blush:

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.