
Python Quiz: Lists, Dicts, Sets, and More

Quiz
•
Computers
•
2nd Grade
•
Hard
Beebi Naseeba
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print([1, 2, 3] + [4, 5, 6])?
[1, 2, 3, 4, 5, 6]
[5, 7, 9]
[4, 5, 6, 1, 2, 3]
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does list1.append(5) do?
Adds 5 to the end of list1
Inserts 5 at index 0
Deletes index 5
Raises an error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print(len([1, [2, 3], 4]))?
3
4
5
2
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove an element from a list by value?
list.remove(value)
list.delete(value)
list.pop(value)
del list[value]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of list1 = [1, 2, 3] and list1 * 2?
[1, 2, 3, 1, 2, 3]
[1, 2, 3, 2]
[1, 2, 3, 1]
[2, 4, 6]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of dict1 = {'a':1, 'b':2}; print(dict1['a'])?
'a'
1
2
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you get all the keys of a dictionary?
dict.keys()
dict.values()
dict.items()
dict.get()
Create a free account and access millions of resources
Similar Resources on Wayground
50 questions
Quiz Pengetahuan Komputer

Quiz
•
2nd Grade
48 questions
Máy tính căn bản ngày 22 tháng 10 năm 2023

Quiz
•
1st - 5th Grade
50 questions
Introducción a la Programación

Quiz
•
1st - 3rd Grade
53 questions
Digital Arts

Quiz
•
KG - 12th Grade
55 questions
*Computer Science Test*

Quiz
•
KG - Professional Dev...
50 questions
Prof examen bueno part 2

Quiz
•
1st - 12th Grade
52 questions
MH 1.2.2 Applications Generation

Quiz
•
2nd Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
10 questions
Human-Environment Interactions Vocab Unit 1 Grade 2 Quiz

Quiz
•
2nd Grade
20 questions
Proper and Common nouns

Quiz
•
2nd - 5th Grade
30 questions
Multiplication Facts 1-12

Quiz
•
2nd - 5th Grade