20. Given the following function definition. def combinator(y): return (lambda x: lambda y: x(y))(lambda x:y) What is the result of evaluating the expression combinator(lambda x:x*10) (11) (12)? (A) 100 (C) 132 (E) None of the above 120 (B) (D) Run time error is encountered

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question

Hi, can teach me how to evaluate this step by step thank you!

 

Please show code and screenshot

20. Given the following function definition.
def combinator (y):
return (lambda x:
lambda y: x(y))(lambda x:y)
What is the result of evaluating the expression
combinator (lambda x:x*10) (11) (12)?
(A) 100
(C) 132
(E) None of the above
(B)
120
(D) Run time error is encountered
Transcribed Image Text:20. Given the following function definition. def combinator (y): return (lambda x: lambda y: x(y))(lambda x:y) What is the result of evaluating the expression combinator (lambda x:x*10) (11) (12)? (A) 100 (C) 132 (E) None of the above (B) 120 (D) Run time error is encountered
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning