<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<br><br>> From: ian.g.kelly@gmail.com<br>> Date: Sun, 15 Aug 2010 17:39:57 -0400<br>> Subject: Re: NZEC what is it?<br>> To: python-list@python.org<br>> <br>> On Sun, Aug 15, 2010 at 12:56 PM, Mikael B <mback1@live.se> 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>> Non-zero exit code. Unless you're calling sys.exit, this normally<br>> means your program raised an uncaught exception.<br>> <br>> In the case of your program, I believe that codechef currently uses<br>> Python 2.5. The math.factorial function was added in Python 2.6, so<br>> it would not be available.<br>> <br>> Cheers,<br>> Ian<br><br>Ahaa! Thank you.<br><br>regards Mikael<br><br><br><br><br> </body>
</html>