A: Test
abcxyz
B: abc
C: abcxyz
D: Test abc
xyz
举一反三
- #print("Test")print("abc") #print("xyz")程序输出 A: Test<br/>abc xyz B: Test <br/>abc <br/>xyz C: abc D: abc xyz
- #print("Test") print("abc") #print("xyz") 程序输出
- a='ABC'b=aa='XYZ'print(a)print(b),输出结果为? A: XYZ ABC B: ABC XYZ C: ABC ABC D: XYZ XYZ
- 阅读下面的程序:[br][/br]class Test:[br][/br]data1 = 10[br][/br]def __str__(self): return "data1 = %d" % (self.data1)[br][/br]test = Test()[br][/br]print(test)[br][/br]print(repr(test))[br][/br]上述程序最终执行的结果为()。 A: 面向对象.Test object at 0x101ca12e8>data1 = 10 B: 面向对象.Test object at 0x101ca12e8><面向对象.Test object at 0x101ca12e8 C: data1 = 10data1 = 10 D: data1 = 10
- 运行下面程序的输出结果是()[br][/br]a = list("abc") print("#" .join(a)) A: abc B: abc C: D: E: abc F: a G: b H: c
内容
- 0
以下程序的输出结果是____。[br][/br]for s in "abc":[br][/br]for i in range____: print ____ if s=="c":[br][/br]break
- 1
执行下面代码的输出结果是( )。[br][/br]class test:[br][/br] __data=0[br][/br]a=test() __data=10[br][/br]a._test__data=20[br][/br]test.__data=30[br][/br]print(test._test__data) A: 0 B: 10 C: 20 D: 30
- 2
执行下列代码后的输出结果是() class test: __data = 0[br][/br] a = test() a.__data = 10 a._test__data = 20 test.__data = 30 print(test.test__data) A: 0 B: 10 C: 20 D: 30
- 3
What will be the output of the following Python code? [br][/br]print("abc DEF".capitalize()) A: abc def B: ABC DEF C: Abc def D: Abc Def
- 4
下列Python代码,函数的定义和调用书写正确的是() A: def test(a| b): print(a) print(b) test(1| 2) B: def test(a): print(a) print(b) test(1, 2) C: def test(a, b): print(a) print(b) test(1) D: def test(a, b): print(a) print(b) test(1, 2)