NZEC what is it?

Mikael B mback1 at live.se
Sun Aug 15 14:46:29 EDT 2010




From: mback1 at live.se
To: python at mrabarnett.plus.com
Subject: RE: NZEC  what is it?
Date: Sun, 15 Aug 2010 19:58:44 +0200










> Date: Sun, 15 Aug 2010 18:22:54 +0100
> From: python at mrabarnett.plus.com
> To: python-list at python.org
> Subject: Re: NZEC  what is it?
> 
> Mikael B wrote:
> > Hi
> >  I use, among other things,  a site,  http://www.codechef.com  to learn 
> > python.
> > I don't know what platform they use. I use  linux.
> > 
> > When I submit this little piece of  code to them:
> > 
> > import sys
> > import math
> > 
> > #main
> > 
> > s=sys.stdin.read()
> > 
> > int_list=s.split()
> > 
> > for a in int_list[1:]:
> >         print math.factorial(int(a))
> > 
> > 
> > they generate a runtime error :NZEC   but I don't  (python 2.6)
> > 
> > What is NZEC  and what could cause it in these few lines of code?
> > 
> I googled for it and found that it means "non-zero exit code", perhaps
> due to an exception. Not a helpful message! :-)
> 
> What happens if you deliberately raise an exception, eg:
> 
>      raise ValueError

If I add to the end I just get 'ValueError'  I tried to add '1/0' but got 'ZeroDivisionError'  Maybe I should try to add 'sys.exit(0)'  and see what happens if I submit again...
> -- 
> http://mail.python.org/mailman/listinfo/python-list
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100815/08a7909d/attachment-0001.html>


More information about the Python-list mailing list