
Session 5

Quiz
•
Information Technology (IT)
•
University
•
Hard

Mimansha Ramcharn
Used 5+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are true of Python lists?
All elements must be of the same type
These represent the same list: ['a', 'b', 'c'] and ['c', 'a', 'b']
A list may contain any type except another list
There is no conceptual limit to the size of a list
A given object may appear in a list more than once
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
List a is defined as follows: a = [1, 2, 3, 4, 5]
Statements that remove the middle element 3 from a:
a.remove(3)
del a[2]
a[2] = [ ]
a[2:2] = [ ]
a[2:3] = [ ]
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
List a is defined as follows: a = ['a', 'b', 'c']
To add 'd' and 'e' to the end, so that the answer is a = ['a', 'b', 'c', 'd', 'e']
Which statements are true?
a += ['d', 'e']
a.append(['d', 'e'])
a = ['a', 'b', 'c', 'd', 'e']
a[len(a):] = ['d', 'e']
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which function counts elements in a list?
find()
index()
count()
len()
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Let list1 = [2, 4, 6, 8, 10].
What will print(list1[-2]) result in?
6
8
error
-2
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which statement is NOT correct?
A list is mutable
The append function is used to add an element
A tuple is immutable
The extend function adds an element to a tuple
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Can lists contain tuples and vice versa?
Yes
No
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Pretest Minggu 4

Quiz
•
University
10 questions
NoSQL Concepts

Quiz
•
University
15 questions
Quiz về Kiểu Dữ Liệu List và Set (1)

Quiz
•
7th Grade - University
12 questions
PYTHON APTITUDE

Quiz
•
University
10 questions
[DS28] Ice Breaking - Day 4

Quiz
•
University
12 questions
Python Programming Competition

Quiz
•
University
10 questions
Refresh Python

Quiz
•
University
13 questions
Python Programming Quiz

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