dictionary

dictionary

University

16 Qs

quiz-placeholder

Similar activities

第七章 CSS入门

第七章 CSS入门

University

17 Qs

資料庫期末題庫

資料庫期末題庫

University

19 Qs

【速成輸入法】複習

【速成輸入法】複習

KG - University

12 Qs

RBT 5年级

RBT 5年级

5th Grade - University

12 Qs

网络与通讯2

网络与通讯2

10th Grade - University

14 Qs

113 4-2網路手遊勿沈迷

113 4-2網路手遊勿沈迷

4th Grade - University

15 Qs

zsTest1

zsTest1

KG - University

15 Qs

2024 Chap 4 运算式 Test 2

2024 Chap 4 运算式 Test 2

University

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