
PYTHON DATA STRUCTURES

Quiz
•
Other
•
University
•
Hard
Arjun Kulshrestha
Used 14+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_list = [1, 2, 3, 4, "This is a String", "1"]
print(my_list[2])
What will be the output of the above code?
3
4
Error
This is a String
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_tuple = (5, 10, 15, 20)
print(len(my_tuple))
What will be the output of the above code?
4
10
15
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_dict = {"apple": 3, "banana": 5, "orange": 2}
print(my_dict["banana"])
What will be the output of the above code?
3
5
2
"banana"
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_set = {1, 2, 3, 4, 5}
my_set.add(6)
print(my_set)
What will be the output of the above code?
a) {1, 2, 3, 4, 5, 6}
b) {1, 2, 3, 4, 5}
{6}
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_list = [1, 2, 3, 4, 5]
my_list.remove(3)
print(my_list)
a) [1, 2, 4, 5]
b) [1, 2, 3, 4, 5]
c) [1, 2, 4]
d) Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_tuple = (10, 20, 30, 40, 50)
print(my_tuple[-2])
What will be the output of the above code?
30
40
20
50
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
my_dict = {"apple": 3, "banana": 5, "orange": 2}
print("grape" in my_dict)
What will be the output of the above code?
"grape"
False
True
Error
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
DFC 10042 PROBLEM SOLVING AND PROGRAM DESIGN

Quiz
•
University
12 questions
Intro to Python Programming Quiz 9C

Quiz
•
10th Grade - University
20 questions
Week 1 QUIZ

Quiz
•
University
10 questions
UNIT1_PYTHON

Quiz
•
University
20 questions
Programming Fundamentals

Quiz
•
KG - University
10 questions
#Sg_Spaic Last season Quiz (ML and Python)

Quiz
•
KG - Professional Dev...
13 questions
Introduction to Python Programming Quiz 9E

Quiz
•
10th Grade - University
18 questions
MIDTERM EXAM

Quiz
•
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