# 递归求阶乘
def mi(num):
if(num==1 or num==0):
return 1
else:
return num*mi(num-1)
for i in range(6):
print(mi(i))
#print(mi(3))
def fact(j):
sum = 0
if j == 0:
sum = 1
else:
sum = j * fact(j - 1)
return sum
for i in range(6):
print('%d! = %d' % (i,fact(i)))