Testcase faling

whats wrong with the code?

Save your code on ide.codingblocks.com and then share its link.

You have to find the sum of all digits which are even and the sum of all digits which are odd separately. If the sum of all even digits is divisible by 4 or sum of all odd digits is divisible by 3, then only print β€œYes”. In all other cases print β€œNo”.
So if digit is odd, you add it to odd sum. And if digit is even, you add it to even sum.
Try to correct your code.

i dont understand wats wrong with the code , one time i submit it gets suceed and the other time i again submitit gets failed??

In your previous code logic was wrong as i mentioned above. You were maintaing the oddsum and even sum based on the position of digit. But actually you have to do that based on digit value. If digit is odd, add it to oddsum. If it is even then add it to even sum.
Try to correct your code.
If still test cases does not pass then share the link of your updated code.

thankyou understood ,thanks for the help :)\

num = []
n = int(input())
for i in range(0,n):
num.append(input())

for i in range(0, n):
even = 0
odd = 0
a = [int(c) for c in num[i]]
for i in range(len(a)):
    if a[i] % 2 == 0:
        even = even + a[i]
        print(even)
    else:
        odd = odd + a[i]
if even % 4 == 0 or odd % 3 == 0:
    print("Yes")
elif even % 4 != 0 and odd % 3 != 0:
    print("No")

I have done this in Python 3