
Python Quiz
Quiz
•
Computers
•
University
•
Hard
Sumit Kumar
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the output be of ((500//7) % 5) ** 3?
1
2.91
0
8
71.42
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
How will you extract ‘love’ from the string S = “I love Python”? (More than one option may be correct.).
S[2:5]
S[2:6]
S[3:7]
S[-11:-7]
S[-11:-8]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have a list L = [1, 2, 3], what will the output of L * 2 be?
[2, 4, 6]
[1, 2, 3, 1, 2, 3]
[1, 4, 9]
[[1, 2, 3], [1, 2, 3]]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have a list L = [[1, 2, 3], [4, 5, 6], [7, 8, 9, 10]], what will the output of L[2: ] be?
[[7, 8, 9, 10]]
[7, 8, 9, 10]
[3, 4, 5, 6, 7, 8, 9, 10]
[[3], [4, 5, 6], [7, 8, 9, 10]]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If you have a tuple T = (3, 5, 7, 11), what will the output of T.append(9) be?
(3, 5, 7, 9, 11)
(3, 5, 7, 11, 9)
(9, 3, 5, 7, 11)
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the output be of the following code?
D = {1:['Raj', 22], 2:['Simran', 21], 3:['Rahul', 40]}
for val in D:
print(val)
1
2
3
[‘Raj’, 22]
[‘Simran’, 21]
[‘Rahul’, 40]
1 [‘Raj’, 22]
2 [‘Simran’, 21]
3 [‘Rahul’, 40]
‘Raj’
‘Simran’
‘Rahul’
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the ‘comprehension equivalent’ be for the following snippet of code?
for sentence in paragraph:
for word in sentence.split():
single_word_list.append(word)
word for sentence in paragraph for word in sentence.split()
[word for sentence in paragraph for word in sentence.split()]
word for word in sentence.split() for sentence in paragraph
[word for word in sentence.split() for sentence in paragraph]
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
20 questions
Visualisasi data
Quiz
•
8th Grade - University
20 questions
Software Engineering Quiz 1
Quiz
•
University
20 questions
QUIZ BAB 4: SISTEM OPERASI
Quiz
•
8th Grade - University
21 questions
logica excel
Quiz
•
1st Grade - University
20 questions
Round 1 ( RHA Learner Contest )
Quiz
•
University
15 questions
Unit 1 lesson 1
Quiz
•
University - Professi...
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
20 questions
Network topologies
Quiz
•
8th Grade - University
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 Computers
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
12 questions
Halloween
Quiz
•
3rd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
14 questions
Eat Healthy,Be Healty
Quiz
•
4th Grade - University
7 questions
History of Halloween: Pagan or Christian?
Interactive video
•
11th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
