题库 Python题库 题目列表 运行下列程序,输出的结果是?def dtox(x,base&n...
单选题

运行下列程序,输出的结果是?

def dtox(x,base = 2):
    s = []
    while x>0:
        s.append(x % base)
        x = x // base
    return s
print(dtox(11))
A.

程序出错

B.

1101

C.

[1, 1, 0, 1]

D.

[1, 0, 1, 1]

题目信息
2022年 6月 选择题
50%
正确率
0
评论
24
点击