Recursive function won't compile
George Sakkis
george.sakkis at gmail.com
Wed Apr 2 19:19:12 EDT 2008
On Apr 2, 5:00 pm, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> bc1... at googlemail.com schrieb:
>
>
>
> > #include <stdio.h>
> > #include <stdlib.h>
>
> > 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?
>
> Given that you obviously don't use python, but some weird cross-breed
> beteween python and C - who are we to judge the semantics of that chimera?
>
> Diez
Seems like a bad belated April Fool's day joke to me.
George
More information about the Python-list
mailing list