
Higher Order Functiond and Regex
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Dhana Lakshmi
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a lambda function in Python?
A lambda function is an anonymous function defined with the lambda keyword, allowing for quick, inline function definitions.
A lambda function is a method for defining classes in Python.
A lambda function is a built-in Python library for data analysis.
A lambda function is a type of variable in Python.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a lambda function that adds two numbers?
lambda x, y: x - y
lambda a, b: a * b
lambda num1, num2: num1 / num2
lambda x, y: x + y
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the map() function in Python?
The purpose of the map() function in Python is to apply a function to every item in an iterable and return an iterator of the results.
To filter items from an iterable
To sort items in an iterable
To create a new list from an existing list
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does the filter() function work in Python?
filter() modifies the original iterable by removing elements.
filter() filters elements from an iterable based on a function that returns True or False.
filter() sorts elements in an iterable based on their values.
filter() creates a new iterable without any conditions.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the reduce() function do in Python?
The reduce() function reduces an iterable to a single value by applying a function cumulatively.
The reduce() function filters elements from an iterable based on a condition.
The reduce() function sorts an iterable in ascending order.
The reduce() function splits an iterable into multiple values.
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Can you provide an example of using map() with a lambda function?
list(map(lambda x: x-1, range(5))
list(map(lambda x: x+1, [1, 2, 3, 4]))
map(lambda x: x*2, [1, 2, 3])
list(map(lambda x: x**2, [1, 2, 3, 4]))
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: list(map(lambda x: x**2, [1, 2, 3, 4]))?
[1, 2, 3, 4]
[1, 8, 27, 64]
[0, 1, 4, 9]
[1, 4, 9, 16]
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
Computer parts
Quiz
•
1st - 12th Grade
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
20 questions
3°DS _AV2_R2 3TEC_PM_Programação Mobile _12_20 Quizizz
Quiz
•
11th Grade - University
17 questions
Cuestionario de Certificación JS 2024
Quiz
•
12th Grade
15 questions
1.1 Computer Systems Essential Knowledge
Quiz
•
9th - 12th Grade
17 questions
Logic Gates Quiz (A Level 3.2)
Quiz
•
12th Grade
10 questions
Ввод вывод данных
Quiz
•
6th Grade - University
12 questions
website design elements
Quiz
•
12th Grade
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
