题目
题目

Fal25_CS003C_74229 Ch. 6 Pre-Quiz (Remotely Proctored)

单项选择题

Given the list values = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], which statement fills the list with these numbers: 1 2 3 4 5 6 7 8 9 10

选项
A.for i in range(10) : values[i] = i
B.for i in range(10) : values[i] = i + 1
C.for i in range(0, 10) : values[i] = i
D.for i in range(1, 10) : values[i] = i
查看解析

查看解析

标准答案
Please login to view
思路分析
The problem provides an initial list: values = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], and asks which code fills the list with the sequence 1 through 10. Option 1: for i in range(10) : values[i] = i This would assign 0, 1, 2, ..., 9 to values[0] through values[9], resulti......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!