Learn with Yasir

Share Your Feedback

Python Lambda Functions MCQ Quiz - Test Your Knowledge with Practice Questions


Challenge yourself with Python lambda functions multiple-choice questions (MCQs). Practice key concepts like syntax, usage with map/filter, and real-world applications.

📝 Multiple Choice Questions

🟢 Beginner

Q1. What is the output of the following Python code?

add_ten = lambda x: x + 10
print(add_ten(5))
  • 🟢 A. 15
  • 🔵 B. 10
  • 🟠 C. 5
  • 🔴 D. 20
Answer

15

The lambda function adds 10 to the given input. 5 + 10 = 15.


Q2. What is the output of the following Python code?

mul = lambda a, b: a * b
print(mul(2, 4))
  • 🟢 A. 6
  • 🔵 B. 8
  • 🟠 C. 4
  • 🔴 D. 2
Answer

8

The lambda function multiplies the two inputs: 2 * 4 = 8.


Q3. What is the output of the following Python code?

is_even = lambda x: x % 2 == 0
print(is_even(6))
  • 🟢 A. true
  • 🔵 B. false
  • 🟠 C. None
  • 🔴 D. 0
Answer

true

6 is divisible by 2, so the lambda function returns True.


Q4. What is the output of the following Python code?

(lambda x, y: x + y)(6, 8)
  • 🟢 A. 14
  • 🔵 B. 48
  • 🟠 C. 68
  • 🔴 D. 86
Answer

14

The lambda function adds 6 and 8, resulting in 14.


Q5. What is the output of the following Python code?

result = (lambda x, y: x * y)(5, 3)
print(result)
  • 🟢 A. 15
  • 🔵 B. 8
  • 🟠 C. 5
  • 🔴 D. 3
Answer

15

The lambda function multiplies 5 and 3, resulting in 15.


🟡 Intermediate

🔴 Advanced

Q1. What is the output of the following Python code?

multiply = lambda x, y: x * y
mult = lambda x, y: multiply(x, y)
result = mult(6, 2)
print(result)
  • 🟢 A. 8
  • 🔵 B. 12
  • 🟠 C. 6
  • 🔴 D. 2
Answer

12

The first lambda `multiply` multiplies two numbers. The second lambda `mult` calls the first, so 6 * 2 = 12.