dictionary

dictionary

University

16 Qs

quiz-placeholder

Similar activities

23 爱恨交加话手机

23 爱恨交加话手机

University

13 Qs

软件工程 - 作业 3

软件工程 - 作业 3

University

20 Qs

20190116巴赫體驗活動

20190116巴赫體驗活動

4th Grade - University

14 Qs

資安檢測_7

資安檢測_7

7th Grade - University

12 Qs

zsTest3

zsTest3

KG - University

15 Qs

Python NOC 3 - Q

Python NOC 3 - Q

KG - Professional Development

14 Qs

生活小常识

生活小常识

University

13 Qs

Ingram Micro Annual Dinner 2023

Ingram Micro Annual Dinner 2023

University

12 Qs

dictionary

dictionary

Assessment

Quiz

Computers

University

Hard

Created by

Shiwen Zhang

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下哪个选项是一个字典

x = ('apple', 'banana', 'cherry')

x = {'type' : 'fruit', 'name' : 'banana'}

x = ['apple', 'banana', 'cherry']

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

词典创建后,词典条目就无法删除。

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

字典不能有两个同名的键。

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

您可以通过引用键名来访问字典项。

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

使用该get方法打印字典中“model”键的值car。

car = { "brand": "Ford", "model": "Mustang", "year": 1964 }

print(_________)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

考虑以下代码:打印结果是什么?

x = {'type' : 'fruit', 'name' : 'banana'}
print(x['type'])

banana

fruit

type = 'fruit'

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

考虑以下代码

x = {'type' : 'fruit', 'name' : 'banana'}

哪个代码可以把fruit改为berry

x{'type'} = 'berry'

x['type'] = 'berry'

x.get('type') = 'berry'

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?