<DIV>Question for the following program: sec 5.5</DIV>
<DIV> </DIV>
<DIV>def factorial (n):</DIV>
<DIV>   if n == 0:</DIV>
<DIV>      return 1</DIV>
<DIV>   else:</DIV>
<DIV>      recurse = factorial (n-1)</DIV>
<DIV>      result = n * recurse</DIV>
<DIV>      return result</DIV>
<DIV> </DIV>
<DIV>How come whenever I state the function with "n" given a value it prints no results in the interpreter for EX:</DIV>
<DIV>
<DIV> </DIV>
<DIV>def factorial (n):</DIV>
<DIV>   if n == 0:</DIV>
<DIV>      return 1</DIV>
<DIV>   else:</DIV>
<DIV>      recurse = factorial (n-1)</DIV>
<DIV>      result = n * recurse</DIV>
<DIV>      return result</DIV>
<DIV>factorial (3)</DIV>
<DIV> </DIV>
<DIV>So instead I have to give a "print" command to make the result appear in the interpreter </DIV>
<DIV>for EX:</DIV></DIV>
<DIV> </DIV>
<DIV>
<DIV>def factorial (n):</DIV>
<DIV>   if n == 0:</DIV>
<DIV>      return 1</DIV>
<DIV>   else:</DIV>
<DIV>      recurse = factorial (n-1)</DIV>
<DIV>      result = n * recurse</DIV>
<DIV>      return result</DIV>
<DIV>print factorial(3)</DIV>
<DIV> </DIV>
<DIV>Is this correct....should I have to give a print command??</DIV></DIV><p>
                <hr size=1> <a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/">Yahoo! FareChase - Search multiple travel sites in one click.</a>