• 2022-06-06 问题

    下列说法不正确的是( )。知识点:全局变量 A: x = 5def fun(): x = 2 x = x * 3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 5 B: x = 5def fun(): global x x = 2 x = x*3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 6 C: x = 5def fun(): x = x * 3 print(x ,end=' ')fun()print(x)程序无误,输出的结果为15 15 D: x = 5def fun(): print(x, end=' ')fun()print(x)程序无误,输出的结果为5 5

    下列说法不正确的是( )。知识点:全局变量 A: x = 5def fun(): x = 2 x = x * 3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 5 B: x = 5def fun(): global x x = 2 x = x*3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 6 C: x = 5def fun(): x = x * 3 print(x ,end=' ')fun()print(x)程序无误,输出的结果为15 15 D: x = 5def fun(): print(x, end=' ')fun()print(x)程序无误,输出的结果为5 5

  • 2021-04-14 问题

    下列程序的输出结果是________。 def f(a, b) : return a + b def main() : a = 5 b = 6 print(f(a, b)) main()

    下列程序的输出结果是________。 def f(a, b) : return a + b def main() : a = 5 b = 6 print(f(a, b)) main()

  • 2021-04-14 问题

    给出下面代码的运行结果: def fun_1(x, y=3): x = x * 10 + y return fun_2(x) def fun_2(x): return x / 5 fun_1(6, 5)

    给出下面代码的运行结果: def fun_1(x, y=3): x = x * 10 + y return fun_2(x) def fun_2(x): return x / 5 fun_1(6, 5)

  • 2021-04-14 问题

    def Sum(*p): return sum(p) print(Sum(3, 5, 8)) 运行结果是( )

    def Sum(*p): return sum(p) print(Sum(3, 5, 8)) 运行结果是( )

  • 2021-04-14 问题

    def Sum(a, b=3, c=5): print(a,b,c) Sum(8) 运行结果是:

    def Sum(a, b=3, c=5): print(a,b,c) Sum(8) 运行结果是:

  • 2022-06-12 问题

    What will be the output of the following Python code? [br][/br]print("abc DEF".capitalize()) A: abc def B: ABC DEF C: Abc def D: Abc Def

    What will be the output of the following Python code? [br][/br]print("abc DEF".capitalize()) A: abc def B: ABC DEF C: Abc def D: Abc Def

  • 2022-06-09 问题

    def f(x,n = 2): return(x**n)print(f(5))print(f(3,3))

    def f(x,n = 2): return(x**n)print(f(5))print(f(3,3))

  • 2022-06-09 问题

    函数定义格式正确的是() A: def f(n) B: def f(n): C: def (n): D: def fn:

    函数定义格式正确的是() A: def f(n) B: def f(n): C: def (n): D: def fn:

  • 2021-04-14 问题

    写出下面代码的运行结果( )def f(a,b=5,c=7...end=’ ’)print(f(10))

    写出下面代码的运行结果( )def f(a,b=5,c=7...end=’ ’)print(f(10))

  • 2021-04-14 问题

    下列语句中,正确的是? def f(a,b,*):;;|def f(a=0,b):|def f(a,b==0):;|def f(a,*b):

    下列语句中,正确的是? def f(a,b,*):;;|def f(a=0,b):|def f(a,b==0):;|def f(a,*b):

  • 1 2 3 4 5 6 7 8 9 10