code for chapter 3

This commit is contained in:
Aditya Bhargava
2016-03-02 14:15:37 -08:00
parent 77da85bf4c
commit 8cf108a20c
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
def fact(x):
if x == 1:
return 1
else:
return x * fact(x-1)
print fact(5)