不知道怎么写了,各位请告知写下步骤
可以这样写:
def f(n): if n==1: return 10 else: n-=1 return f(n)+2#递归调用函数 print(f(5))#参数5为总人数