写出下面代码的运行结果( )def fun(*p):return sum(p)a=1b=2c=3print(fun (a, b, c))
举一反三
- 写出下面代码的运行结果( )def fun(a,b): return a+bx=2y=5z=8r=fun(fun(x,y),z)print(r)
- def Sum(*p): return sum(p) print(Sum(3, 5, 8)) 运行结果是( )
- 中国大学MOOC: 写出下面代码的运行结果( )def f(a,b=5,c=7):return sum([a,b,c])print(f(a=6,c=2),end=’ ’)print(f(10))
- 下列程序的运行结果是:fun(int x){ int p;if(x==0||x==1) return(3);p=x-fun(x-2); return p;} main(){ printf(“%d”,fun(9));} A: 7 B: 2 C: 0 D: 3
- .以下程序的运行结果是( )。#includestdio.hint fun(int x){int p;if(x==0||x==1)return(3);p=x-fun(x-2);return p;}main(){printf(%d\n,fun(7));} A: 2 B: 3 C: 7 D: 0