
dictionary

Quiz
•
Computers
•
University
•
Hard

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
Similar Resources on Wayground
20 questions
tk库测试

Quiz
•
University
12 questions
simple

Quiz
•
University
12 questions
RBT 5年级

Quiz
•
5th Grade - University
14 questions
第六章 HTML的标准

Quiz
•
University
15 questions
随堂测验-网络爬虫

Quiz
•
University
17 questions
第七章 CSS入门

Quiz
•
University
20 questions
第十三章 表格与列表

Quiz
•
University
14 questions
网络与通讯2

Quiz
•
10th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade