"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>> #include
>> #include
>>
>> def RecursiveFact(n):
>> if(n>1):
>> return n*RecursiveFact(n-1)
>> else:
>> return 1
>>
>> fact = RecursiveFact(31)
>> print fact
>>
>> fact = "End of program"
>> print fact
>>
>>
>> ..but y
On Apr 2, 5:00 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
>
>
> > #include
> > #include
>
> > def RecursiveFact(n):
> > if(n>1):
> > return n*RecursiveFact(n-1)
> > else:
> > return 1
>
> > fact = RecursiveFact(31)
> > print fact
>
> >
[EMAIL PROTECTED] schrieb:
> #include
> #include
>
> def RecursiveFact(n):
> if(n>1):
> return n*RecursiveFact(n-1)
> else:
> return 1
>
> fact = RecursiveFact(31)
> print fact
>
> fact = "End of program"
> print fact
>
>
> ..but yet it still gives the right answe
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
(Subject: Recursive function won't compile)
>#include
>#include
>
>def RecursiveFact(n):
>..but yet it still gives the right answer. How is this possible?
Possibly because it gives the right ans
On Apr 2, 5:23 pm, [EMAIL PROTECTED] wrote:
> #include
> #include
>
> def RecursiveFact(n):
> if(n>1):
> return n*RecursiveFact(n-1)
> else:
> return 1
>
> fact = RecursiveFact(31)
> print fact
The output is 822283865417792281772556288000 and is correct. But
the "#incl
[EMAIL PROTECTED] wrote:
> #include
> #include
>
> def RecursiveFact(n):
> if(n>1):
> return n*RecursiveFact(n-1)
> else:
> return 1
>
> fact = RecursiveFact(31)
> print fact
>
> fact = "End of program"
> print fact
>
>
> ..but yet it still gives the right answer. How
#include
#include
def RecursiveFact(n):
if(n>1):
return n*RecursiveFact(n-1)
else:
return 1
fact = RecursiveFact(31)
print fact
fact = "End of program"
print fact
..but yet it still gives the right answer. How is this possible?
--
http://mail.python.org/mailman/l