某Python程序段如下:
def doit(x):
if x>=6:
ans=1
else:
ans=3*doit(x+1)+2*doit(x+2)
return ans
print(doit(3))
程序运行后,输出的结果为( )
【考点】分支结构.
【答案】C
【解答】
【点评】
声明:本试题解析著作权属菁优网所有,未经书面同意,不得复制发布。
发布:2024/5/23 20:38:36组卷:4引用:3难度:0.4