下面代码的输出结果是:________。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 = < '大海':'蓝色', '树叶':'绿色', '国旗':'红色' >
for i in range(9):if i % 2 == 0:continueelse:print(i,end=",")
下面代码的输出结果是: 。ls = [[1,3,6],[4,6,3],[2,8,5]]sum1,sum2 = 0,0for i in range(3):sum1 = sum1 + ls[i][i]sum2 = sum2 + ls[i][2-i]print("sum1={},sum2={}".format(sum1,sum2))