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

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

def s(n):
    if n==3:
        return 4
    else:
        return n+s(n-1)
print(s(5))
A.

1

B.

12

C.

13

D.

15

题目信息
2025年 3月 选择题
37%
正确率
0
评论
33
点击