题目内容

以下代码的输出结果是counter = 1num = 0def tset():global counterfor i in (1, 2, 3):counter += 1num = 10tset()print(counter, num)

A. 4 10
B. 1 10
C. 1 0
D. 4 0

查看答案
更多问题

以下代码的输出结果是def SUM(a, b=3, c=5):return sum([a, b, c])print(SUM(8, 2))

A. 12
B. 13
C. 14
D. 15

以下代码的输出结果是d =lambda x : x*2t = lambda x : x*3a= 2a = d(a)a = t(a)a = d(a)print(a)

A. 24
B. 23
C. 22
D. 21

以下代码的输出结果是def sum_func(*args):sm = 0for i in args:sm += ireturn smprint(sum_func(1, 2, 3, 7, 4, 5, 6))

A. 26
B. 27
C. 28
D. 29

以下代码的输出结果是def func(L):return len(L) > 5print(func("123456"))

A. True
B. 123456
C. False
D. None

答案查题题库