求阶乘:
me:
m=1
a=5
def fun1():
global m
global a
m=m*a
a=a-1
if (a<=0) :
return 1
fun1()
return m
fun1()
别人:
def fun3(n):
if (n==1):
return 1
return n*fun3(n-1)
fun3(5)
求阶乘:
me:
m=1
a=5
def fun1():
global m
global a
m=m*a
a=a-1
if (a<=0) :
return 1
fun1()
return m
fun1()
别人:
def fun3(n):
if (n==1):
return 1
return n*fun3(n-1)
fun3(5)