下面代码的输出结果是:
a = [[1,2,3], [4,5,6], [7,8,9]]
s = 0
for c in a:
for j in range(3):
s += c[j]
print(s)
a = [[1,2,3], [4,5,6], [7,8,9]]
s = 0
for c in a:
for j in range(3):
s += c[j]
print(s)
举一反三
- 以下代码的输出结果是______。 A: = [[1,2,3], [4,5,6], [7,8,9]] <br>s = 0 <br>for c in a: <br> for j in range(3): <br> s += c[j] <br>print(s)<br> <br>45 B: 24 C: 0 D: 6
- 下面代码的输出结果是 a = [[1,2,3], [4,5,6], [7,8,9]] s = 0 for c in a: for j in range(____): s += c[j] print(____)A、
- 下面代码的输出结果是( )。 a=[[1,2,3],[4,5,6],[7,8,9]] s=0 for i in range(2): for j in range(3): s+=a[i][j] print(s)[/i] A: 15 B: 6 C: 45 D: 21
- 以下代码的输出结果是______。a = [[1,2,3], [4,5,6], [7,8,9]]s = 0for c in a:for j in range(3):s += c[j]print(s) A: 6 B: 45 C: 21 D: 0
- 下面代码的输出结果是 a = [[1,2,3], [4,5,6], [7,8,9]]s = 0for c in a: for j in range(3): s += c[j]print(s) A: 24 B: 以上答案都不对 C: 45 D: 0