
Python Quiz 1
Authored by Thomas Sheeba
Computers
Professional Development
Used 13+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
aList = [5, 10, 15, 25]
print(aList[::-2])
· [15, 10, 5]
· [10, 5]
[25,10]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following
aList = [1, 2, 3, 4, 5, 6, 7]
pow2 = [2 * x for x in aList]
print(pow2)
· [2, 4, 6, 8, 10, 12, 14]
· [2, 4, 8, 16, 32, 64, 128]
· [2, 4, 8, 16, 32, 64]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code
my_list = ["Hello", "Python"]
print("-".join(my_list))
HelloPython-
Hello-Python
-HelloPython
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Select all the correct options to copy a list
aList = ['a', 'b', 'c', 'd']
· newList = copy(aList)
· newList = aList.copy()
· newList.copy(aList)
· newList = list(aList)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)
· []
· list index out of range.
· [10, 20]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list operation
aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])
·[20, 30, 40, 50]
[10, 20, 30, 40]
[30, 40, 50, 60, 70, 80]
[30, 40, 50]
[10, 20, 30, 40]
[40, 50, 60, 70, 80]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following list comprehension
resList = [x+y for x in ['Hello ', 'Good '] for y in ['Dear', 'Bye']]
print(resList)
[‘Hello Dear’, ‘Hello Bye’, ‘Good Dear’, ‘Good Bye’]
[‘Hello Dear’, ‘Good Dear’, ‘Hello Bye’, ‘Good Bye’]
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
Tin học lớp 5 phần mềm Logo
Quiz
•
Professional Development
13 questions
Strings and Arrays
Quiz
•
Professional Development
10 questions
DECI - Week 2 - round
Quiz
•
Professional Development
12 questions
Computer Networking Fundamentals
Quiz
•
Professional Development
11 questions
DECI - M3 - W4 - Round2
Quiz
•
Professional Development
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Scratch
Quiz
•
KG - Professional Dev...
10 questions
Python Collections
Quiz
•
Professional Development
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
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...