以下代码的输出结果是______。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: 6
B: 45
C: 21
D: 0
举一反三
- 下面代码的输出结果是 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 = 0for c in a: for j in range(3): s += c[j]print(s) A: 24 B: 以上答案都不对 C: 45 D: 0
- 下面代码的输出结果是( )。 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,1,1], [2,2,2], [3,3,3]]s = 0for c in a: for j in range(3): s += c[j]print(s) A: 3 B: 9 C: 18 D: 6
- 以下程序的输出结果是: frame = [[1,2,3],[4,5,6],[7,8,9]] rgb = frame[::-1] print(rgb) A: [[7, 8, 9]] B: [[1,2,3],[4,5,6],[7,8,9]] C: [[7, 8, 9], [4, 5, 6], [1, 2, 3]] D: [[1, 2, 3], [4, 5, 6]]