第五章测试
1.使用( )关键字来创建python自定义函数。( ) 。
A:function B:procedure C:def D:func
答案:A
2.下列函数参数定义不合法的是( ) 。
A:def myfunc(a=1, **args): B:def myfunc(*args, a=1): C:def myfunc(arg1=1): D:def myfunc(*args): 3.程序: a=10def setNumber(): a=100setNumber()print(a)此程序的运行结果是( ) 。
A:10010 B:100 C:10100 D:10 4.函数中必须包含return语句。( )
A:错 B:对 5.调用函数时传递的实参个数必须与函数形参个数相等才行。( )
A:对 B:错

温馨提示支付 ¥3.00 元后可查看付费内容,请先翻页预览!
点赞(5) dxwkbang
返回
顶部