dictionary

dictionary

University

16 Qs

quiz-placeholder

Similar activities

資訊冷知識

資訊冷知識

University

20 Qs

認識Quizizz

認識Quizizz

KG - University

13 Qs

C++程式

C++程式

11th Grade - University

11 Qs

多媒體概論(2)

多媒體概論(2)

University - Professional Development

20 Qs

西餐礼仪

西餐礼仪

University

11 Qs

toDelete06

toDelete06

10th Grade - University

19 Qs

移动通信5-3

移动通信5-3

University

12 Qs

大数据采集

大数据采集

University

16 Qs

dictionary

dictionary

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Shiwen Zhang

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?