Which of the following is a valid way to call a function in Python?
Python Assessment-2

Quiz
•
Education
•
University
•
Medium
Munnangi Vinay
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
call add()
add()
function add()
def add()
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which function is used to apply a function to all the elements in an iterable?
filter()
map()
reduce()
apply()
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code snippet?
def square(x):
return x * x
numbers = [1, 2, 3, 4, 5]
squared_numbers = map(square, numbers)
print(list(squared_numbers))
[1, 4, 9, 16, 25]
[2, 4, 6, 8, 10]
[1, 2, 3, 4, 5]
[1, 8, 27, 64, 125]
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
numbers = [1, 2, 3, 4, 5]
result = list(map(lambda x: x * 2, numbers))
print(result)
[1, 2, 3, 4, 5]
[2, 4, 6, 8, 10]
[2, 3, 4, 5, 6]
[1, 4, 9, 16, 25]
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a valid set in Python?
{1, 2, 3, 3, 4}
{1, 2, [3, 4]}
{1, 2, (3, 4)}
{1, 2, {3, 4}}
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
words = ["apple", "banana", "orange", "kiwi"]
result = list(filter(lambda x: len(x) > 5, words))
print(result)
["apple" ,"banana"]
["orange", "kiwi"]
["apple" ,"orange"]
["banana","orange"]
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
numbers = [ ]
result = map(lambda x: x, numbers)
print(list(result))
[ ]
None
[0]
[None]
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
BRAIN BUSTERS (ROUND2)

Quiz
•
University
15 questions
Round 2

Quiz
•
University
16 questions
DS Training QUIZ 1

Quiz
•
University
20 questions
Python Coding Contest

Quiz
•
University
20 questions
Python Assignment 1

Quiz
•
University
15 questions
DSA & Code Snippets

Quiz
•
University
25 questions
Easy BreezeIII

Quiz
•
University
15 questions
CSI-P1

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade