以下python代码运行的结果是()def setstr( ):s="hi"s+=" world"print(setstr( ))
A. hi world
B. None
C. hi
D. world
查看答案
以下python代码运行的结果是()s="hello"def setstr( ):s="hi"s+=" world"return sprint(s)
A. hi world
B. hello hi world
C. hello world
D. hello
以下程序代码运行的结果是()def printinfo(name, age=35):print("Name:{},Age:{}".format(name,age))# 调用printinfo函数printinfo(age=50, name="王海")printinfo("张三")
A. Name:王海,Age:50Name:张三,Age:0
B. Name:王海,Age:50Name:张三,Age:35
C. Name:王海,Age:50Name:张三
D. Name:王海,Age:35Name:张三,Age:35
def showNumber(numbers):for n in numbers:print(n)下面哪个在调用函数时会报错( )
A. showNumber('abcesf')
B. showNumber([2,4,5])
C. showNumber(3.4)
D. showNumber((12,4,5))
以下选项中,不属于函数的作用的是( )
A. 提高代码执行速度
B. 增强代码可读性
C. 降低编程复杂度
D. 代码复用