Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 23 páginas
Examen

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

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

ITSW 2113 (D278) Scripting & Programming FoundaITSW 2113 (D278) Scripting & Programming Foundations Latest OA Guide 2025ITSW 2113 (D278) Scripting & Programming Foundations Latest OA Guide 2025tions Latest OA Guide 2025

Vista previa del contenido

D278 ITSW 2113

Scripting & Programming - Foundations

3.0 Credits

Objective Assessment Review (Qns &
Ans)

2025




©2025

, Question 1:
A data analytics professional is optimizing a Python script that processes large
datasets. To identify performance bottlenecks in the code, which module should be
used for profiling?
A. `timeit`
B. `cProfile`
C. `pdb`
D. `logging`

Correct ANS: B. `cProfile`

Rationale:
While the `timeit` module can benchmark small code snippets and `pdb` is a
debugger, `cProfile` is the dedicated profiler in Python that collects comprehensive
performance statistics, making it ideal for identifying bottlenecks within large-scale
data processing scripts.

---

Question 2:
Which of the following is not typically a characteristic of scripting languages
compared to compiled languages?
A. Dynamic typing
B. Interpreted execution at runtime
C. Automatic memory management
D. Requirement for explicit memory allocation

Correct ANS: D. Requirement for explicit memory allocation

Rationale:
Scripting languages like Python and JavaScript are known for their dynamic typing,
interpreted execution, and automatic garbage collection. Unlike many compiled
languages such as C or C++, scripting languages do not require explicit memory
allocation or management.

---

©2025

, Question 3:
In the context of advanced programming, which statement about closures is most
accurate?
A. A closure is a recursive function that calls itself indefinitely.
B. A closure is a function that captures variables from its lexical scope.
C. Closures are used solely for implementing object-oriented concepts.
D. A closure allows a function to modify global state without restrictions.

Correct ANS: B. A closure is a function that captures variables from its lexical
scope.

Rationale:
Closures enable a function to "remember" the environment in which it was created.
This mechanism is central in functional programming and is widely used in scripting
languages to manage state without relying on globals.

---

Question 4:
Which option best describes the concept of duck typing in dynamic programming
languages?
A. Determining an object's type based solely on its class declaration
B. Inferring an object's capabilities based on the presence of certain methods and
properties
C. Relying on compile-time type checks to enforce method signatures
D. Using interface declarations to restrict object behavior

Correct ANS: B. Inferring an object's capabilities based on the presence of
certain methods and properties

Rationale:
Duck typing centers on the principle that “if it quacks like a duck, it must be a duck.”
This means that the suitability of an object is determined by the methods and
properties it supports rather than its explicit type, promoting flexibility in dynamic
languages.

---

Question 5:
When automating file processing tasks, ensuring resource cleanup even when

©2025

Información del documento

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

¿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.
EmilioOchieng
4.1
(24)
Vendido
148
Seguidores
17
Artículos
4032
Última venta
3 meses 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