
Python Quiz 1

Quiz
•
Computers
•
Professional Development
•
Hard

Thomas Sheeba
Used 13+ times
FREE Resource
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’]
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
DECI - Week 2 - round

Quiz
•
Professional Development
10 questions
python quiz

Quiz
•
6th Grade - Professio...
10 questions
Python Collections

Quiz
•
Professional Development
10 questions
C Code Master lvl 2 A

Quiz
•
Professional Development
13 questions
Phyton Lección 2

Quiz
•
Professional Development
10 questions
Computer Devices Quiz

Quiz
•
Professional Development
15 questions
Python Quiz

Quiz
•
Professional Development
13 questions
Strings and Arrays

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade