Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

ITSW 2135 (D493) Scripting & Programming Applications Latest OA Guide 2025

Document preview thumbnail
Preview 3 out of 24 pages

ITSW 2135 (D493) Scripting & Programming Applications Latest OA Guide 2025ITSW 2135 (D493) Scripting & Programming Applications Latest OA Guide 2025

Content preview

D493 ITSW 2135

Scripting & Programming Applications

3.0 Credits

Objective Assessment Review (Qns &
Ans)

2025




©2025

, Multiple Choice Questions

Question 1:
In a large-scale web application developed in JavaScript, which approach
most effectively minimizes “callback hell” and improves code readability
when dealing with asynchronous operations?
A. Increasing the number of nested callbacks
B. Using promises with `.then()` chaining
C. Implementing async/await syntax
D. Relying solely on setTimeout for delays

Correct ANS: C. Implementing async/await syntax
Rationale:
Async/await syntax allows asynchronous code to be written in a form
similar to synchronous code. This flattening of the control flow helps
prevent deeply nested callbacks, making the code easier to read and
maintain.

---

Question 2:
A data analytics team is automating routine data ingestion and
transformation tasks using Python. Which technique can most effectively
reduce memory overhead when processing large datasets?
A. Using list comprehensions for all operations
B. Employing generator expressions to yield one item at a time
C. Reading entire files into memory before processing
D. Implementing recursive functions without optimization

Correct ANS: B. Employing generator expressions to yield one item at
a time
Rationale:
©2025

, Generator expressions in Python evaluate items lazily, meaning they
generate one item at a time rather than the entire list at once. This
lowers memory usage significantly, which is especially important in data-
intensive applications.

---

Question 3:
When building a command‑line automation tool in a scripting language,
which advanced feature allows functions to “remember” the
environment in which they were created, thereby maintaining state
between calls?
A. Event loop
B. Closure
C. Recursion
D. Template literals

Correct ANS: B. Closure
Rationale:
Closures capture the local variables of the enclosing scope, enabling a
function to access that state even after the outer function has finished
executing. This feature is invaluable for creating functions with private
state in scripting applications.

---

Question 4:
In a Node.js application that processes filesystem data, which built‑in
module provides essential methods for asynchronous file operations?
A. http
B. os
C. fs
D. path

Correct ANS: C. fs
©2025

Document information

Uploaded on
May 9, 2025
Number of pages
24
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown
$16.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
testbank11
3.5
(4)
Sold
39
Followers
7
Items
4461
Last sold
2 months ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions