dictionary

dictionary

University

16 Qs

quiz-placeholder

Similar activities

S1516 资讯伦理+Web3.0

S1516 资讯伦理+Web3.0

7th Grade - University

18 Qs

2023.09——Python基础语法

2023.09——Python基础语法

University

20 Qs

資安檢測_7

資安檢測_7

7th Grade - University

12 Qs

數字系統的基本概念與應用

數字系統的基本概念與應用

12th Grade - University

13 Qs

Pandas基础

Pandas基础

University

20 Qs

zsTest3

zsTest3

KG - University

15 Qs

Python Lists Quiz

Python Lists Quiz

University

17 Qs

Python NOC 3 - Q

Python NOC 3 - Q

KG - Professional Development

14 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?