
LIST And Tuple
Quiz
•
Science
•
University
•
Practice Problem
•
Hard
Dr. 2669
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
1. What will be the output of the following Python code?
a=[1,2,3,4,5,6,7,8,9]
print(a[::2])
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
2. What will be the output of the following code snippet?
a=[1,2,3,4,5]
print(a[3:0:-1])
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
4. The below code is iterating over a nested Python list. What will be the output?
arr = [[1, 2, 3, 4],
[4, 5, 6, 7],
[8, 9, 10, 11],
[12, 13, 14, 15]]
for i in range(0, 4):
print(arr[i].pop())
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements given below is/are true about a Python tuple?
A. Tuples have structure, and lists have an order.
B. Tuples are homogeneous, and lists are heterogeneous.
C. Tuples are immutable, and lists are mutable.
D. All of them.
A. Tuples have structure, and lists have an order.
B. Tuples are homogeneous, and lists are heterogeneous.
C. Tuples are immutable, and lists are mutable.
D. All of them.
A&B
B&C
A & C
D&A
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
my_list = [1, 2, 3]
my_tuple = tuple(my_list)
print(my_tuple)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
my_list = [10, 20, 30, 40, 50]
What does my_list[2] return?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the key difference between lists and tuples in Python?
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Chapter 1 RO
Quiz
•
University
15 questions
HTML Quiz
Quiz
•
11th Grade - University
10 questions
C++ Array Quiz
Quiz
•
University
10 questions
Geologia Geral
Quiz
•
University
15 questions
Unit-2- Multimeter
Quiz
•
University
10 questions
Plodovi mora
Quiz
•
10th Grade - Professi...
10 questions
QUIZ DE APARATO CARDIOVASCULAR
Quiz
•
University
10 questions
Norma ISO 9001:2015 - I
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
