智慧职教: def f(a,b): t=a a=b b=t a=1 b=2 f(a,b) print(a,b) 结果是
举一反三
- 下面代码的输出结果是什么? def f(value, values): v = 1 values[0] = 44 t = 3 v = [1, 2, 3] f(t, v) print(t, v[0]) A: 1 1 B: 1 44 C: 3 1 D: 3 44
- 智慧职教: def f(n): if n==0: return 0 elif n==1: return 1 return f(n-1)+f(n-2) print(4) 结果是
- 下列程序的输出结果是:x = 1 y = 2 def swap(a, b): t = a a = b b = t print a, b swap(x, y) print x, y A: 1 21 2 B: 2 11 2 C: 1 22 1 D: 2 12 1
- 【多选题】若f 1 (t) = ɛ (-t) , f 2 (t) = e t ,则f 1 (t)* f 2 (t) = A. f 1 ꞌ (t)* f 2 (–1) (t) B. f 1 (–1) (t)* f 2 ꞌ (t) C. f 1 (t-3)* f 2 (t+3) D. f 1 (–3) (t)* f 2 ꞌꞌꞌ (t)
- 下列程序的输出结果是________。 def f(a, b) : return a + b def main() : a = 5 b = 6 print(f(a, b)) main()