
Python Training 3
Authored by Devanjali Relan
Computers
Professional Development
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
def func(a, b=5, c=10):
return a + b + c
print(func(1, 2))
13
8
18
3
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def add_items(items, lst=[]):
for item in items:
lst.append(item)
return lst
print(add_items([1, 2, 3]))
print(add_items([4, 5]))
[1, 2, 3], [4, 5]
[1, 2, 3], [1, 2, 3, 4, 5]
[4, 5], [4, 5, 1, 2, 3]
[1, 2, 3], [1, 2, 3, 4, 5]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
x = (i for i in range(5))
print(next(x))
print(next(x))
print(next(x))
0, 1, 2
1, 2, 3
0, 1, 1
Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
d = {'a': 1, 'b': 2, 'c': 3}
d['d'] = 4
print(d)
{'a': 1, 'b': 2, 'c': 3}
{'a': 1, 'b': 2, 'c': 3, 'd': 4}
{'d': 4, 'a': 1, 'b': 2, 'c': 3}
Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def func(a, b):
return a * b
x = map(func, [1, 2, 3], [4, 5, 6])
print(list(x))
[4, 10, 18]
[4, 5, 6]
[1, 2, 3, 4, 5, 6]
Error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
x = [i for i in range(10) if i % 2 == 0]
print(x)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[0, 2, 4, 6, 8]
[1, 3, 5, 7, 9]
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
def func(*args):
return sum(args)
print(func(1, 2, 3, 4))
10
(1, 2, 3, 4)
[1, 2, 3, 4]
Error
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
20 questions
SEGURETAT DIGITAL ÀREA 1 CDD (B1)
Quiz
•
Professional Development
13 questions
MindSpace Computers C Quiz-1 2025
Quiz
•
Professional Development
14 questions
CompTIA A+ U6
Quiz
•
9th Grade - Professio...
20 questions
Salesforce Developer
Quiz
•
Professional Development
14 questions
IC3_Test1
Quiz
•
Professional Development
20 questions
VIDEOJUEGOS-CMSB
Quiz
•
1st Grade - Professio...
20 questions
Introduction to Machine Learning
Quiz
•
University - Professi...
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
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...