题库 Python题库 题目列表 下列程序段的运行结果是?( )def s(n): ...
单选题

下列程序段的运行结果是?(

def s(n):
    if n==0:
        return 1
    else:
        return n +s(n-1)
print(s(7))
A.

29

B.

27

C.

1

D.

0

题目信息
2023年 6月 选择题
83%
正确率
0
评论
45
点击