> 文章列表 > 2023.03.18青少年软件编程(Python)等级考试试卷(五级)

2023.03.18青少年软件编程(Python)等级考试试卷(五级)

2023.03.18青少年软件编程(Python)等级考试试卷(五级)

2023.03.18青少年软件编程(Python)等级考试试卷(五级)

一、单选题(共25题,共50分)
1.已知一个列表lst = [2,3,4,5,6],lst.append(20),print(lst)的结果是?(C
A. [10,2,3,4,5,6,20]
B. [20,2,10,3,4,5,6]
C. [2,3,4,5,6,20]
D. [2,3,4,5,6,10,20]

2.水果店管理员现有列表 fruits = [\'apple\', \'orange\', \'banana\', \'peach\'] ,当前卖出苹果(\'apple\'),需要删去列表元素\'apple\',正确的操作是?(A
A. del fruits[0]
B. del fruits[\'apple\']
C. del fruits[1]
D. del fruits[apple]
Python列表元素删除的基本操作,’apple’的列表索引值为0,则操作为del fruits[0] 。

3.科技小组4位同学分别在Python中定义了一个列表,正确的是?(C
A. list1 = [\'power\'; \'sensor\'; \'control\'

周公解梦