下面代码的执行结果是def exchange(a,b): a,b = b,a return (a,b)x = 10y = 20x,y = exchange(x,y)print(exchange(x,y))
A: (10, 20)
B: (20, 10)
C: 10, 20
D: 20, 10
A: (10, 20)
B: (20, 10)
C: 10, 20
D: 20, 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)
- 下面代码的输出结果是()。def exchange(a,b): a,b = b,a return (a,b)x = 10y = 20x,y = exchange(x,y)print(x,y) A: 20 20 B: 10 10 C: 20 10 D: 20,10
- 下面代码的输出结果是。 def exchange(a,b): a,b=b,a return (a,b)x=10y=20x,y=exchange(x,y)print(x,y)( ) A: 10 20 B: 10 10 C: 出错 D: 20 10
- def exchange(a,b): a,b = b,a return (a,b)x = 10y = 20x,y = exchange(x,y)print(x,y) A: 20,10 B: 20 20 C: 10 10 D: 20 10
- 下面代码的输出结果是 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