【单选题】下列程序的运行结果是: print(10 and 20) print(20 and 10) print(10 or 20) print(20 or 10)
A. 20 10 10 20 B. 20 20 10 10 C. 10 20 10 20 D. 20 10 20 10
A. 20 10 10 20 B. 20 20 10 10 C. 10 20 10 20 D. 20 10 20 10
举一反三
- 下列程序的输出结果是___________。a=[10,20,30]print(a*2) A: [10, 20, 30, 10, 20, 30] B: [20, 40, 60] C: [11, 22, 33] D: [10, 20, 30]
- 下面代码的输出结果是 def exchange(a,b): a,b = b,a return (a,b) x = 10 y = 20 x,y = exchange(x,y) print(x,y) A: 20 10 B: 20 20 C: 10 20 D: 10 10
- 写出下面代码的运行结果( )def exchange(a,b): return (b,a)x = 10y = 20x,y = exchange(x,y)print((x,y)) A: 10 20 B: 20 10 C: (20, 10) D: (10, 20)
- 语句x=”10”; y=20; print(x+y)的运行结果是() A: 10 B: 20 C: 30 D: 运行出错
- 下面代码的输出结果是( ).def exchange(a, b):a, b = b, areturn(a,b)x = 10y = 20x, y = exchange(x, y)print(x, y) A: 20 10 B: 20,10 C: 10 10 D: 20 20