
python
Quiz
•
Education
•
Professional Development
•
Medium
Auzoom four
Used 1+ times
FREE Resource
Enhance your content in a minute
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity of accessing an element by index in a list in Python?
a) O(1)
b) O(n)
c) O(log n)
d) O(n^2)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
lst = [1, 2, 3, 4]
lst[1:3] = [9, 8]
print(lst)
[1, 9, 8, 4]
[1, 2, 9, 8, 4]
[1, 9, 8]
Error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
lst = [1, 2, 3]
lst.insert(1, 10)
print(lst)
a) [1, 10, 2, 3]
b) [10, 1, 2, 3]
c) [1, 2, 3, 10]
d) Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you remove all elements from a list lst?
a) lst.clear()
b) lst.remove()
c) lst.delete()
d) lst.reset()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code output?
lst = [5, 10, 15, 20]
lst[1:3] = [8, 12]
print(lst)
a) [5, 8, 12, 20]
b) [5, 8, 12, 15, 20]
c) [5, 8, 12]
d) [5, 8, 12, 15, 20]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
my_set = {1, 2, 3, 4, 5}
my_set.add(5)
print(my_set)
a) {1, 2, 3, 4, 5}
b) {5, 1, 2, 3, 4}
c) {1, 2, 3, 4, 5, 5}
d) Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following operation?
a = {1, 2, 3}
b = {3, 4, 5}
result = a & b
print(result)
a) {1, 2}
b) {3}
c) {3, 4, 5}
d) {1, 2, 3, 4, 5}
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
DATA.13 - Revisão - Relembrar é Viver
Quiz
•
Professional Development
11 questions
REVISÃO PARA PROVA IM
Quiz
•
Professional Development
15 questions
Susah ke PAJSK ?
Quiz
•
Professional Development
12 questions
Russian Prepositions
Quiz
•
10th Grade - Professi...
20 questions
Ramazan
Quiz
•
1st Grade - Professio...
20 questions
English Grammar Nouns
Quiz
•
KG - Professional Dev...
12 questions
Tesis, Argumentos y Postura Crítica
Quiz
•
Professional Development
15 questions
Digital Electronics-Final
Quiz
•
University - Professi...
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Education
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
