From: mba...@live.se
To: pyt...@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: pyt...@mrabarnett.plus.com
> To: python-list@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
                                          
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to