
Python Quiz 2

Quiz
•
Other
•
Professional Development
•
Hard
21RU5A0505 KRISHNAVENI
Used 1+ times
FREE Resource
34 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following functions is not a built-in functional programming tool in Python?
map()
filter()
reduce()
sorted()
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is The map() function in Python
Filters elements based on a condition
Transforms each element using a function(apply on each element)
Reduces a sequence to a single value
Sorts a sequence
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which import is required to use reduce() in Python?
import collections
import itertools
from functools import reduce
from operator import reduce
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the correct syntax of a lambda function?
Note:Without Storing in a variable
lambda (x, y): x + y
lambda x, y: x + y
def lambda(x, y): return x + y
def (x, y): return x + y
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following code output?
f = lambda x: x * 2
print(f(5))
5
10
25
error
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following statements about lambda is TRUE?
lambda can contain multiple return statements.
lambda can take multiple arguments but only one expression.
lambda is faster than normal functions.
lambda must always be named.
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the code return?
add = lambda a, b=10: a + b
print(add(5))
5
10
15
Error
Create a free account and access millions of resources
Similar Resources on Wayground
38 questions
100 ngày từ vựng du học #7

Quiz
•
Professional Development
31 questions
ISTELI TRANSPORT

Quiz
•
Professional Development
35 questions
piggy

Quiz
•
KG - Professional Dev...
35 questions
mha

Quiz
•
Professional Development
30 questions
Реклама, Художественное проектирование 2 курс 2 семестр

Quiz
•
Professional Development
32 questions
C# Skill Review

Quiz
•
12th Grade - Professi...
30 questions
2024 Simulado 8 p17

Quiz
•
Professional Development
30 questions
2024 Simulado 05

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

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade