def calc(n,count):
# print(n,count)
if count <8:
return calc(n*count,count+1)
else:
return n
b = calc(1,2)
print(b)
reuse calc function, and pass the result of each calculation into the calc function
to get the result 5040
def calc(n,count):
# print(n,count)
if count <8:
return calc(n*count,count+1)
else:
return n
b = calc(1,2)
print(b)
reuse calc function, and pass the result of each calculation into the calc function
to get the result 5040