题目内容

下列关于函数的说法中,错误的是()

A. 函数可以减少程序的重复,使程序更加模块化
B. 函数体中如果没有return语句,不会返回任何值
C. 在不同的函数中可以使用相同的变量名
D. 函数不能嵌套使用

查看答案
更多问题

一个函数的内部还可以调用其他函数,如果它调用的函数是它本身,那么这样的函数就是()

A. 递归函数
B. 匿名函数
C. 内置函数
D. 自定义函数

函数定义如下,下列选项中调用函数错误的是()def func_test(a,b=7,*c,**d):......

A. func_test(1,2,3,4,5)
B. func_test(m=3,n=4)
C. func_test(2)
D. func_test(2,3,t=4)

已知func_test()函数定义如下,下列()选项中的输出结果为“27”。def func_test(a=2,b=3):print(a**b)

A. func_test()
B. func_test(9,3)
C. func_test(3)
D. func_test(a=2,b=3)

欲将两数中较小的数返回,应定义的匿名函数为( )

A. mymin=Iambda x,y:x if x>=y else y
B. mymin=Iambda x,y:x if x C. mymin=Iambda x,y: if x D. mymin=Iambda x,y: if x

答案查题题库