#695. 初赛测试题(小高)1
初赛测试题(小高)1
选择题
- 定义非遗苏绣针法字典
embroidery = {"平针":5, "打籽针":8, "盘金针":12},执行print(embroidery["盘金针"])的结果是() {{ select(1) }}
512报错8
- 非遗木雕工坊每日产量列表
output = [78,85,92,88,90],执行sorted(output, reverse=True)后,第一个元素是() {{ select(2) }}
78928590
- 执行语句
for i in range(3, 9, 2): print(i),不会输出的数字是() {{ select(3) }}
3957
- 定义非遗糖画制作工具元组
tools = ("铜勺", "石板", "糖稀", "剪刀"),下列操作正确的是() {{ select(4) }}
tools[2] = "麦芽糖"tools.remove("剪刀")print(len(tools))tools.append("竹签")
- 非遗扎染工坊二维数据
dye = [[200,5],[300,8],[250,6]],表示(染料用量,制作件数),dye[2][1]的值是() {{ select(5) }}
25063008
- 执行
,输出结果是() {{ select(6) }}try: print(int("非遗")) except ValueError: print("输入错误")`
非遗0输入错误报错
- 非遗戏曲列表
opera = ["京剧", "越剧", "昆曲", "豫剧", "黄梅戏"],执行opera[-3]的结果是() {{ select(7) }}
昆曲越剧京剧豫剧
- 非遗竹编工坊产量字典
prod = {"周一":75, "周二":82, "周三":78, "周四":85},获取所有值的和的正确代码是() {{ select(8) }}
sum(prod.keys())len(prod)sum(prod)sum(prod.values())
- 列表
paper_cut = [120, 150, 180, 130],执行paper_cut.pop(2)后,列表的长度是() {{ select(9) }}
4352
- 二维数据
craftsman = [["李师傅",95,90],["王师傅",88,92],["张师傅",92,89]],表示(姓名,上午产量,下午产量),获取王师傅下午产量的写法是() {{ select(10) }}
craftsman[1][2]craftsman[2][1]craftsman[0][2]craftsman[1][1]
- 定义非遗剪纸价格字典
price = {"窗花":15, "福字":20, "生肖":25},修改福字价格为22的正确语句是() {{ select(11) }}
price.add("福字",22)price[福字] = 22price.set("福字",22)price["福字"] = 22
- 非遗陶艺烧制时间列表
time = [1.5, 2.0, 1.8, 2.2, 1.6],计算平均烧制时间的正确代码是() {{ select(12) }}
sum(time)*len(time)sum(time)/len(time)(max(time)-min(time))/2max(time)+min(time)
- 执行语句
,最后输出的i是() {{ select(13) }}i=0; while i<4: i+=1; if i==3: break; print(i)
3204
- 定义非遗文创列表
cultural = ["皮影", "刺绣", "陶艺", "木雕"],判断"竹编"是否在列表中的正确语句是() {{ select(14) }}
cultural.index("竹编")cultural.find("竹编")cultural in "竹编""竹编" in cultural
- 非遗工坊采购宣纸
x=450张,分发给9个匠人,执行x//9的结果是() {{ select(15) }}
504550.09
判断题
- Python中元组的元素可以进行修改和删除操作。() {{ select(16) }}
- 对
- 错
- 二维数据可以用列表的列表来表示,通过双层索引可以访问具体元素。() {{ select(17) }}
- 对
- 错
- try-except异常处理结构中,except块可以捕获并处理try块中出现的程序错误。() {{ select(18) }}
- 对
- 错
- Python中字典的键可以重复,值不可以重复。() {{ select(19) }}
- 对
- 错
- for循环中使用continue语句可以终止整个循环的执行。() {{ select(20) }}
- 对
- 错