Dictionary = {“name”:”Max”,”age”:27}
print(dictionary)
What is the output?
Intermediate python
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Regensu Live
Used 1+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dictionary = {“name”:”Max”,”age”:27}
print(dictionary)
What is the output?
{‘name’:’Max’,’age’:27}
{name:Max,age:27}
‘name’:’Max’,’age’:27
name:Max,age:27
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the ways to make a dictionary?
A = {“name”:Max}
A = dict(name=Max
A = [“name”:Max]
A = [name = Max]
A = (“name”:”Max”)
A = dict[name = Max
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a dictionary?
Items with Key-Value Pairs
Immutable list
Mutable list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dictionary = {“name”:”Max”}
Value = dictionary[“name”]
print(Value)
What is the output?
Max
“Max”
{‘Max’}
[Max]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
D = {“name”:”Max”}
D[“name”] = “Sam”
Print(D)
What is the output?
{‘name’:’Sam’}
Sam
[‘name’]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add something in a dictionary?
Dictionary[“age”] = 3
Dictionary.add(“age”: 3)
Dictionary.update(“age”:3)
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What are the ways to delete an item in a dictionary?
del D[“name”]
D.remove[name]
D.pop(“name”)
D.delete(“name”)
8.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
What are the ways to find if an item exists in a dictionary?
If “name” in dictionary:
print(“exists”)
Else:
print(“doesn’t exist”)
try:
print(dictionary[“name”])
except:
print(“doesn’t exist”)
dictionary.find(“name”)
dictionary.locate(“name”)
9.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
How do you copy dictionaries?
DC = D
DC = D.copy()
D.copy()
D.replicate()
10 questions
Câu hỏi trắc nghiệm Python
Quiz
•
10th Grade
9 questions
Print and Input in Python 2022
Quiz
•
11th Grade
10 questions
KD-1 Dasar pemrograman python
Quiz
•
10th Grade
10 questions
Python Math
Quiz
•
1st - 12th Grade
13 questions
computer science
Quiz
•
11th Grade
14 questions
Y9 - Module 2 - KT1 Python Basics
Quiz
•
9th Grade
6 questions
Procedures Practice Part 2
Quiz
•
9th - 12th Grade
10 questions
DATAFRAME AND SERIES
Quiz
•
12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University