第17748题 判断题
判断用于打印5、4、3、2、1序列的递归Python程序是否正确

为打印出5、4、3、2、1这个数字序列,小明编写了一个递归函数,具体代码如下:

def n(x):
    print(x)
    n(x-1)
    if x == 1:
        return
n(5)
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析