Recursive function won't compile
Diez B. Roggisch
deets at nospam.web.de
Wed Apr 2 17:00:28 EDT 2008
More information about the Python-list mailing list
Wed Apr 2 17:00:28 EDT 2008
- Previous message (by thread): Recursive function won't compile
- Next message (by thread): Recursive function won't compile
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
bc1891 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
- Previous message (by thread): Recursive function won't compile
- Next message (by thread): Recursive function won't compile
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list