can anyone help me to find what is the error in the programm

t=int(input())
for i in range(t):
n,k=[int(x) for x in input(“enter”).split()]
if k==0 and n%4==1:
print(“on”)
elif k==0 and n%4==2:
print(“on”)
elif k==0 and n%4==3:
print(“on”)
elif k==0 and n%4==0:
print(“off”)
elif k==1 and n==0:
print(“on”)
elif k==1 and n%4==0:
print(“on”)
else:
print(“ambiguous”)

It’s helpful to link to the problem you’re trying to solve: I can see from your history that it’s DARLIG. And you should format your code using ‘preformatted text’, otherwise the editor will remove all your indenting and otherwise mess up your code. Do it like this:

# cook your dish here
t=int(input())
for i in range(t):
    n,k=[int(x) for x in input("enter").split()]
    if k==0 and n%4==1:
        print("on")
    elif k==0 and n%4==2:
        print("on")
    elif k==0 and n%4==3:
        print("on")
    elif k==0 and n%4==0:
        print("off")
    elif k==1 and n==0:
        print("on")
    elif k==1 and n%4==0:
        print("on")
    else:
        print("Ambiguous")

The problem with your code is that you have put input(“enter”), so your program is prepending ‘enter’ to every output. You should be able to see this if you run your code against the test examples provided.

You should always be very careful to ensure that your code outputs all and only the specified requirements in the format requested. Good luck!