• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 30 páginas
Examen

IT-ITSW 2113(D278) Scripting & Programming Foundations Latest OA Guide 2025

Document preview thumbnail
Vista previa 3 fuera de 30 páginas

IT-ITSW 2113(D278) Scripting & Programming Foundations Latest OA Guide 2025IT-ITSW 2113(D278) Scripting & Programming Foundations Latest OA Guide 2025IT-ITSW 2113(D278) Scripting & Programming Foundations Latest OA Guide 2025

Vista previa del contenido

IT – D278 ITSW 2113

Scripting & Programming Foundations

3.0 Credits

Objective Assessment Review (Qns &
Ans)

2025




©2025

, Question 1:
Which concept in functional programming ensures that a function always
produces the same output for a given input without causing side effects?
- A. Encapsulation
- B. Polymorphism
- C. Referential Transparency
- D. Data Hiding

Correct ANS: C. Referential Transparency
Rationale:
Referential transparency is a hallmark of pure functions in functional
programming. It guarantees that functions do not depend on external
states, thus producing consistent results and simplifying debugging and
reasoning about code.

---

Question 2:
In dynamically typed scripting languages, what does it mean when we say
that functions are “first-class citizens”?
- A. They are compiled before other entities
- B. They can be assigned to variables, passed as arguments, and returned
from other functions
- C. They are executed with the highest priority
- D. They are stored in a special memory area

Correct ANS: B. They can be assigned to variables, passed as
arguments, and returned from other functions
Rationale:
Treating functions as first-class citizens means they can be used like any
other data type—stored in variables, passed to or returned from
functions—which is fundamental to many scripting languages and
supports higher-order programming.


©2025

, ---

Question 3:
Which type of function allows developers to write anonymous, inline
functions in languages like Python?
- A. Decorator functions
- B. Lambda functions
- C. Recursive functions
- D. Generator functions

Correct ANS: B. Lambda functions
Rationale:
Lambda functions in Python enable the creation of small, anonymous
functions that are defined in a single expression, often used for short-
term operations or as arguments to higher-order functions.

---

Question 4:
What is the term for a function that “remembers” its lexical scope even
when executed outside its original context?
- A. Closure
- B. Coroutine
- C. Recursion
- D. Callback

Correct ANS: A. Closure
Rationale:
A closure arises when a function is defined within another function and
retains access to its parent function’s variables, even after the parent has
finished execution. This allows for data encapsulation and stateful
functions in a functional paradigm.

---


©2025

Información del documento

Subido en
9 de mayo de 2025
Número de páginas
30
Escrito en
2024/2025
Tipo
Examen
Contiene
Desconocido
$17.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Bankart
3.8
(26)
Vendido
178
Seguidores
31
Artículos
4551
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes