以下程序的输出结果是:
def fun1(a,b,*args):
print(a)
print(b)
print(args)
fun1(1,2,3,4,5,6))
def fun1(a,b,*args):
print(a)
print(b)
print(args)
fun1(1,2,3,4,5,6))
举一反三
- 以下程序的输出结果是( )def fun1(a,b,*c):print(a,b,c)fun1(1,2,3,4,5,6) A: 1 2 {3, 4, 5, 6} B: 1,2,3,4,5,6 C: 1 2 (3, 4, 5, 6) D: 1 2 [3, 4, 5, 6]
- 以下程序的输出结果是: def fun1(): print(“in fun1()”) fun2() fun1() def fun2(): print(“in fun2()”) fun1() fun2()
- 以下程序的输出结果是( )def fun1():print("in fun1()")fun2()def fun2():print("in fun2()")fun1()fun1() A: in fun1() in fun2() B: in fun1() C: 死循环 D: 出错
- 以下程序的输出结果是:( )。def fun1():print("in fun1()")fun2()fun1()def fun2():print("in fun2()")fun1()fun2() A: 死循环 B: in fun1()in fun2() C: 出错 D: in fun1()
- 10603.下面程序段的输出为 a=1 def fun(a): a=a+2 print(a) fun(a) print(a) A: 3 1 B: 1 1 C: 4 1 D: 3 3