• 2022-06-30
    Define a function as below with f as the function parameter,def test(f, a, b): print(f(a, b))Which of the following options will be the result of test((lambda x,y: x ** 3 + y), 2, 3)?
    A: 8
    B: 9
    C: 10
    D: 11
  • D

    内容

    • 0

      ‎求常微分方程在[1,3]区间内的数值解,正确的命令有( )。‌‎[img=214x135]17de707813b3012.jpg[/img]‌ A: >;>; f=@(x, y) 2*x/y+2*x;>;>; [x, y]=ode45(@f, [1, 3], 1) B: >;>; f=@(x, y) 2*x/y+2*x;>;>; [x, y]=ode45(f, [1, 3], 1) C: >;>; [x, y]=ode45(@(x, y) 2*x/y+2*x, [1, 3], 1) D: 建立f.m函数文件:function yx=f(x,y)yx=2*x/y+2*x;输入命令:>;>; [x, y]=ode45(@f, [1, 3], 1)

    • 1

      有代码片段:function f(y) {var x=y*y;return x;} for(var x=0;x< 5;x++) {y=f(x);document.writeln(y);}输出结果是( )。 A: 0 1 2 3 4 B: 0 1 4 9 16 C: 0 1 4 9 16 25 D: 0 1 2 3 4 5

    • 2

      下列程序的运行结果是( )。 def f( x=2, y=0 ): return x-y y=f( y=f(), x=5 ) print(y)

    • 3

      阅读下面的JavaScript代码,输出结果是function f(y) {var x=y*y;return x;}for(x=0;x<; 5;x++) {y=f(x);document.writeln(y);} A: 0 1 4 9 16 25 B: 0 1 2 3 4 C: 答案都不对 D: 0 1 4 9 16

    • 4

      设\(z = f(x,y)\),\(x = \sin t\),\(y = {t^3}\),则全导数\( { { dz} \over {dt}} = \) A: \({f'_x} \sin t+ 3{t^2}{f'_y}\) B: \({f'_x} \cos t+ {t^2}{f'_y}\) C: \({f'_x} \cos t+ 3{t^2}{f'_y}\) D: \({f'_y} \cos t+ 3{t^2}{f'_x}\)