<\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 11:59:51\"},{\"id\":154435,\"title\":\"First Class functions in Python-question-2\",\"slug\":\"first-class-functions-in-python-question-2\",\"question\":\"
In the context of first-class functions, what is a higher-order function?<\/span><\/p>\",\"answers\":[{\"id\":590306,\"answer\":\"
A function that can only return primitive data types.<\/span><\/p>\",\"correct\":false,\"sort_order\":0},{\"id\":590307,\"answer\":\"
A function that can take other functions as arguments or return them as results.<\/span><\/p>\",\"correct\":true,\"sort_order\":1},{\"id\":590308,\"answer\":\"
A function that is defined within another function but cannot be returned.<\/span><\/p>\",\"correct\":false,\"sort_order\":2},{\"id\":590309,\"answer\":\"
A function that executes in a separate thread.<\/span><\/p>\",\"correct\":false,\"sort_order\":3}],\"explanation\":\"
<\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:00:32\"},{\"id\":154436,\"title\":\"First Class functions in Python-question-3\",\"slug\":\"first-class-functions-in-python-question-3\",\"question\":\"
What will be the output of the following code?<\/span><\/p>
Functions can be assigned to variables. Here, say_hello becomes another reference to greet.<\/span><\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:01:58\"},{\"id\":154437,\"title\":\"First Class functions in Python-question-4\",\"slug\":\"first-class-functions-in-python-question-4\",\"question\":\"
Which of the following is not a property of first-class functions?<\/span><\/p>\",\"answers\":[{\"id\":590314,\"answer\":\"
Functions can be stored in data structures<\/span><\/p>\",\"correct\":false,\"sort_order\":0},{\"id\":590315,\"answer\":\"
Functions can be assigned to variables<\/span><\/p>\",\"correct\":false,\"sort_order\":1},{\"id\":590316,\"answer\":\"
Functions can return other functions<\/span><\/p>\",\"correct\":false,\"sort_order\":2},{\"id\":590317,\"answer\":\"
Functions can only return primitive types<\/span><\/p>\",\"correct\":true,\"sort_order\":3}],\"explanation\":\"
First-class functions can return any type, including other functions\u2014not limited to primitives.<\/span><\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:03:46\"},{\"id\":154438,\"title\":\"First Class functions in Python-question-5\",\"slug\":\"first-class-functions-in-python-question-5\",\"question\":\"
What will be the output of this code?<\/span><\/p>
outer() returns the inner function, and func() calls it, returning its string.<\/span><\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:05:13\"},{\"id\":154439,\"title\":\"First Class functions in Python-question-6\",\"slug\":\"first-class-functions-in-python-question-6\",\"question\":\"
Which of the following is NOT a characteristic of first-class functions?<\/span><\/p>\",\"answers\":[{\"id\":590322,\"answer\":\"
They can be assigned to variables.<\/span><\/p>\",\"correct\":false,\"sort_order\":0},{\"id\":590323,\"answer\":\"
They can be passed as arguments to other functions.<\/span><\/p>\",\"correct\":false,\"sort_order\":1},{\"id\":590324,\"answer\":\"
They can only be defined once in a program.<\/span><\/p>\",\"correct\":true,\"sort_order\":2},{\"id\":590325,\"answer\":\"
They can be returned from other functions.<\/span><\/p>\",\"correct\":false,\"sort_order\":3}],\"explanation\":\"
<\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:06:14\"},{\"id\":154440,\"title\":\"First Class functions in Python-question-7\",\"slug\":\"first-class-functions-in-python-question-7\",\"question\":\"
What is the output of the following code?<\/span><\/p>
make_multiplier(2) returns a function that multiplies its argument by 2. So, double(5) returns 10.<\/span><\/p>
<\/p>
<\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:07:33\"},{\"id\":154441,\"title\":\"First Class functions in Python-question-8\",\"slug\":\"first-class-functions-in-python-question-8\",\"question\":\"
How does Python treat functions with respect to variables?<\/span><\/p>\",\"answers\":[{\"id\":590330,\"answer\":\"
Functions are static objects<\/span><\/p>\",\"correct\":false,\"sort_order\":0},{\"id\":590331,\"answer\":\"
Functions are constants and cannot be reassigned<\/span><\/p>\",\"correct\":false,\"sort_order\":1},{\"id\":590332,\"answer\":\"
Functions are first-class citizens and can be stored, passed, and reassigned<\/span><\/p>\",\"correct\":true,\"sort_order\":2},{\"id\":590333,\"answer\":\"
Functions must be declared global to be used<\/span><\/p>\",\"correct\":false,\"sort_order\":3}],\"explanation\":\"
Being first-class citizens means functions can be assigned, passed, and returned like other objects.<\/span><\/p>\",\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:09:57\"}],\"quiz\":{\"id\":10547,\"top_description\":\"First Class functions in Python\",\"question_count\":8,\"bottom_description\":\"\",\"title\":\"First Class functions in Python\",\"slug\":\"first-class-functions-in-python\",\"category\":[{\"id\":1842,\"name\":\"Python\",\"slug\":\"python\",\"origin_term_id\":1789,\"origin_slug\":\"programming-language\/python\"}],\"show_answer\":1,\"created_on\":\"2025-06-03 - 11:36:39\",\"updated_on\":\"2025-06-03 - 12:12:30\"}}");
First Class functions in Python - GeeksforGeeks