[ create a new paste ] login | about

Link: http://codepad.org/AhHSF3nK    [ raw code | output | fork ]

Python, pasted on Dec 16:
1
2
3
4
5
6
7
8
9
def fact(n, count = 0):
  count+=1
  if n == 0 or n == 1:
    return 1
  else:
    print count
    return n*fact(n-1, count)

fact(5)


Output:
1
2
3
4
1
2
3
4


Create a new paste based on this one


Comments: