用递归函数编写,实现f=1+1/2+1/3+..1/n(一定要用递归函数!)
收起
def fun(n): if n < 2: return 1 return 1 / n + fun(n - 1)
报告相同问题?