my_list = [1, 2, 3, 4, "This is a String", "1"]
print(my_list[2])
What will be the output of the above code?
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
10 questions
TEST 1
Quiz
•
University
10 questions
DFC 10042 PROBLEM SOLVING AND PROGRAM DESIGN
Quiz
•
University
10 questions
ATP-lab viva
Quiz
•
University
10 questions
Mastering Python Loops
Quiz
•
University
12 questions
C++ Programming Language
Quiz
•
University
10 questions
Python Review Module 14 - Recursion
Quiz
•
University
10 questions
Arduino ELESA
Quiz
•
University
10 questions
AlgoPro Python - Sesi 1
Quiz
•
University
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