Advertisement
Guest User

new(1)

a guest
Jun 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #import numpy as np
  2.  
  3. #sentence = 'bitter and better but not batter and bitter'
  4. #print(sentence)
  5.  
  6. def factrR(n):
  7.     print('Called with n = ', n)
  8.     if n == 1:
  9.         print('Base case = ', n)
  10.         return n
  11.     else:
  12.         res = n * factrR(n-1)
  13.         print('Called with n = ', n,'  return = ', res)
  14.         return res
  15.  
  16. print(factrR(5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement