2014复习2_CP1200.docVIP

  • 2
  • 0
  • 约 8页
  • 2016-08-10 发布于河南
  • 举报
1. What is the output of the following code? x = 1 while x 10: print(x,end= ) x = x + 2 1 3 5 7 9 11 3 5 7 9 11 1 3 5 7 9 1 2 3 4 5 6 7 8 9 2. What is the output of the following code? t = [a,ab,abc] print( len(t[1]),t[2][1]) A. 1 B. 2 b C. 3 D. 6 3. Consider the following code fragment: d = {a: 0, b: 1, c: 2} Which one of the following is an invalid command d[a] = 3 B. d.pop(2) C. d.get(a) D. print ( d.keys() ) 4. What is the output of the following code? def fun(a=1, b=2): return a * 10 + b print (fun(fun(3))) A. 12

文档评论(0)

1亿VIP精品文档

相关文档