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()
Similar Resources on Wayground
12 questions
Python Programming Basics

Quiz
•
7th - 11th Grade
10 questions
Bài 17. Biến và lệnh gán

Quiz
•
10th Grade
10 questions
Java: repetition control structure for & while

Quiz
•
10th - 12th Grade
13 questions
Python Recap Challenge

Quiz
•
10th Grade
12 questions
Project-Stem Unit 1 python coding

Quiz
•
9th - 12th Grade
10 questions
информатика команда Python

Quiz
•
10th Grade
10 questions
Python Math

Quiz
•
1st - 12th Grade
13 questions
computer science

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade