中国大学MOOC: def fun(x,y):global yt=xx=yy=tx=0y=1fun(x,y)print(x,y)结果是
举一反三
- def fun():global x,yt=xx=yy=tx=0y=1fun()print(x,y)结果是1 0 A: 正确 B: 错误
- def fun(x):global yt=xx=yy=tx=0y=1fun(x)print(x,y)结果是 A: 0 1 B: 1 0 C: 1 1 D: 0 0
- deffun(x,y):t=xx=yy=tx=0y=1fun(x,y)print(x,y)结果是10
- def fun(x,y): global x,y t=x x=y y=t x=0 y=1 fun(x,y) print(x,y) 结果是 1 0
- 以下函数定义中,正确的是() A: def fun(x, y) B: def fun(x, y = 3.14) C: def fun(x, *y) D: def fun(*x, y)