NZEC ERROR-CODING IN PYTHON

I was trying to code one of the questions from the January challenge 2015…but after i submitted it, i got this nzec error.could anyone please help and tell what exactly this nzec error is and the possibilities of why i am getting one
i am using python 3

thanks

Codechef would show you an NZEC when your code throws an exception mainly during runtime.

There are many possible reasons for the occurrence of this error, including but not limited to unsafe input handling, operating on non-existent/incorrect data, division by zero, array index out of bounds and many more.

Without further information or the code itself, it is not possible to answer correctly.

But as this is from a LIVE contest, discuss the problem after the contest is over.

i was waiting for the contest to get over …here is the code…just started coding in python .sorry if i have made some rookie mistakes.

def vote():
print("enter the number of test cases\n")
t=int(input())
if (t>50 or t<1):
    print("t cannot have value greater than 50 or less than 1")
    vote()
else:
    def vote2():

        for _ in range(t):
            print("enter the number of opinions\n ")
            n=int(input())
            print("\n")
            if (n>10000 or n<1):
                print("number of opinions cannot have value greater than 10000 or less than 1")
                vote2()
            else:
                print("enter the values of statistic B\n")
                statsb=[]
                for _ in range(n):
                    a=int(input())
                    statsb.append(a)

                for i in range(n):
                    if (statsb[i]>1000 or statsb[i]<0):
                        print("values in STATISTIC B cannot have value greater than 1000 or less than 0")
                        vote2()
                a=0
                for i in range(len(statsb)):
                    a=a+statsb[i]

                if(a<100 or a >101):
                    print(" NO")

                else:

                    print("yes")
    vote2()

vote()

i guess you have to call the function vote() rather than vote2()

Some other ways to resolve the NZEC Error are:

Ensure that an illegal arithmetic operation like dividing by zero is not performed.
Using try-except blocks can help resolve NZEC errors most of the time.
Test your code and always check for corner cases.

Regards,
Rachel Gomez