命名:[tex=8.643x1.214]n9ekyerIcqdBNhorQCDo0aHp5r7q55DT1HjlzJDknUs=[/tex]
举一反三
- set1 = {x for x in range(10) if x%2!=0} set1.remove(1) print(set1) 以上代码的运行结果为? A: {1, 3, 5, 7, 9} B: {1, 3, 5, 7} C: {3, 5, 7, 9} D: {3, 5, 7}
- set1 = {x for x in range(10) if x%2!=0} print(set1) 以上代码的运行结果为? A: {1, 3, 5, 7, 9} B: {1, 3, 5, 7} C: {3, 5, 7, 9} D: {3, 5, 7}
- 用谓词逻辑推理证明:有理数都是实数,有的有理数是整数,因此有的实数是整数。判断推理证明是否正确。 证明:设Q(x):x为有理数;R(x):x为实数;Z(x):x为整数; 前提:∀x(Q(x)→R(x)),∃x(Q(x)∧Z(x)); 结论:∃x(R(x)∧Z(x))。 (1)∃x(Q(x)∧Z(x)) 前提引入 (2)Q(c)∧Z(c) (1)∃- (3)∀x(Q(x)→R(x)) 前提引入 (4)Q(c)→R(c) (3)∀- ( 5 )Q(c) (2) 化简 ( 6 )R(c) (4)(5) 假言推理 ( 7 )Z(c) (2) 化简 (8)R(c)∧ Z(c) (6)(7) 合取引入 (9)∃x(R(x)∧Z(x)) (8)∃+
- 【单选题】Which of the following matrices does not have the same determinant of matrix B: [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -1, 0, -9,-5] A. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 0; -1, 0, -9, -5] B. [1, 3, 0, 2; -2, -5, 7, 4; 1, 0, 9, 5; -1, 0, -9, -5] C. [1, 3, 0, 2; -2, -5, 7, 4; 3, 5, 2, 1; -3, -5, -2, -1] D. [1, 3, 0, 2; -2, -5, 7, 4; 0, 0, 0, 1; -1, 0, -9, -5]
- 下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; n A: 10 5 B: x n C: 9 5 D: 10 6