以下程序的运行结果是哪一项?def f(x): global a a = 7 print a + x, a = 5 f(8) print a
A: 15 7
B: 13 7
C: 15 5
D: 7 13
A: 15 7
B: 13 7
C: 15 5
D: 7 13
举一反三
- 关于以下程序的正确说法是哪一项?def f(x): a = 7 print(a + x)a = 5f(3)print(a)
- 以下程序的输出结果是:list = ["1","3" ,"5"]def app(x):list. append(x)app( "7" )print( list)} A: ['1','3','5'] B: ['1','3','5','7'] C: ['7'] D: "1,3,5,7"
- 以下程序:def fn(a,b,c,d): print(a,b,c,d) returntup = (5,6,7,8)fn(*tup)print函数输出的结果是( ) A: 7 6 5 4 B: 8 7 6 5 C: 5 6 7 8 D: 26
- 下列程序段的执行结果为 i=9 x=5 Do i=i + 1 x=x + 2 Loop Until i>=7 Print "i=":i Print "x=":X A.i=4x=5 B.i=7x=15 C.i=6x=8 D.i=10x=7
- 下列程序段的执行结果是( )。 x = 5: y = 7: z = 8 If x < y Then t = x: x = y: y = t End If If y < z Then t = y: y = z: z = t If x < y Then t = x: x = y: y = t End If End If Print x, y, z A: 8 5 7 B: 8 7 5 C: 5 7 8 D: 7 5 8