<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br><br><hr id="stopSpelling">From: mback1@live.se<br>To: python@mrabarnett.plus.com<br>Subject: RE: NZEC  what is it?<br>Date: Sun, 15 Aug 2010 19:58:44 +0200<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


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