Skip to content

Instantly share code, notes, and snippets.

@computer-tutor
Created April 25, 2020 06:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save computer-tutor/bd28f8bb72ed845d530121aabc7e39ef to your computer and use it in GitHub Desktop.
Save computer-tutor/bd28f8bb72ed845d530121aabc7e39ef to your computer and use it in GitHub Desktop.
Chap 6 Q2]
def prod(a,b,p=0):
p+=a
if b==1:
return p
return prod(a,b-1,p)
print(prod(7,5))
print(prod(8,9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment