What is the output of following code print([(a, b) for a in range(3) for b in range(a)]) ( )
A: [ (0,0),(1,1),(2,2)]
B: [(1,0),(2,1),(2,1)]
C: [ (1,0),(2,0),(2,1)]
D: [ (1,0),(2,1),(3,2)]
A: [ (0,0),(1,1),(2,2)]
B: [(1,0),(2,1),(2,1)]
C: [ (1,0),(2,0),(2,1)]
D: [ (1,0),(2,1),(3,2)]
举一反三
- 下列三点共线的是 A: (1,1),(2,3),(4,5) B: (1,2),(3,5),(7,11) C: (-1,-1),(1,0),(2,1) D: (0,-2),(0,-1),(1,0)
- 已知一个价电子轨道量子数为1,自旋量子数为1/2,总磁量子数的可能值: A: 3/2,1/2 ,-1/2 ,-3/2 B: 3/2 ,1/2 ,-1/2,-3/2 C: 3/2,1/2 ,0,-1/2, -3/2 D: 3/2,1/2 ,1/2 ,0,-1/2, -1/2,-3/2
- 以下电子的四量子数组合,合理的是: A: (3, 0, 1, 1/2) B: (2, 2,1,-1/2) C: (3, 2, -2, 0) D: (3, 2, 2, 1/2)
- 在Matlab中,若a=[4 -1 2; 3 1 0],则find(a>=2)的运算结果为( )。 A: 1 2 5 B: 1 3 4 C: 1 1 0 0 1 0 D: (1,2)(1,3)(2,1)
- a = [x for x in range(4) if x % 2 ==1],语句print(a)输出为 A: [1, 2, 3] B: [0, 1, 2, 3] C: [0, 2] D: [1, 3]