题目内容

变量 tstr = ‘dk3029’, 表达式 eval(tstr[2:-1]) 的结果是:

A. 302
B. 3029
C. dk3029
D. dk302

查看答案
更多问题

下面代码的执行结果是 a = "ABC" b = a a = "XYZ" print(b)

ABC
B. XYZ
C. 出错
D. b

下面代码的执行结果是 >>> x = "Happy Birthday to you!" >>> x * 3

A. 系统报错
B. 'Happy Birthday to you!Happy Birthday to you!Happy Birthday to you!'
C. Happy Birthday to you! *3
D. Happy Birthday to you!

下面代码的输出结果是 a = 5/3+5//3 print(a)

A. 2.666666666666667
B. 3.333333
C. 5.4
D. 14

以下程序的输出结果是 a = 30 b = 1 if a >=10: (缩进)a = 20 elif a>=20: (缩进)a = 30 elif a>=30: (缩进)b = a else: (缩进)b = 0 print('a={}, b={}'.format(a,b))

A. a=20, b=1
B. a=30, b=1
C. a=30, b=30
D. a=20, b=20

答案查题题库