题目内容

下面代码的输出结果是: 15 。mylist = [[1,2,3],[4,5,6],[7,8,9]]sum1 =0for i in range(3):sum1 = sum1 + mylist [i][i]print("sum1={}".format(sum1))

查看答案
更多问题

下面代码的输出结果是:。a = [3,5,8,9,1]n = len(a)m = len(a)//2for i in range(m):a[i],a[n-i-1] = a[n-i-1],a[i]print(a])

下面代码的输出结果是:________。mylist = [83,60,100,55]degree = "DCBAAF"for score in mylist:index = (score - 60)//10if index >= 0:print(degree[index])else:print(degree[-1]

下面代码的输出结果是:____________。ls = [i*2+1 for i in range(5)]print(ls)

A. [1, 3, 5, 7, 9]
B. [1, 2, 3, 4, 5]
C. [ 3, 5, 7, 9, 11]
D. [2, 4, 6, 8, 10]

以下选项中,正确定义了一个字典的是:____________。

A. d = { '大海':'蓝色', '树叶':'绿色', '国旗':'红色' }
B. d = [ '大海':'蓝色', '树叶':'绿色', '国旗':'红色' ]
C. d = ( '大海':'蓝色', '树叶':'绿色', '国旗':'红色' )
D. d = < '大海':'蓝色', '树叶':'绿色', '国旗':'红色' >

答案查题题库