• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 50 pages
Exam (elaborations)

(CS) ITSW 2130 C867 Scripting & Programming Applications Complete FA 2025 (With Solns

Document preview thumbnail
Preview 4 out of 50 pages

(CS) ITSW 2130 C867 Scripting & Programming Applications Complete FA 2025 (With Solns(CS) ITSW 2130 C867 Scripting & Programming Applications Complete FA 2025 (With Solns(CS) ITSW 2130 C867 Scripting & Programming Applications Complete FA 2025 (With Solns

Content preview

CS – ITSW 2130 C867 Scripting & Programming
Applications

Complete Final Assessment (Qns & Ans)

2025

Question 1 (Multiple Choice)
Case:
A system administrator has developed a long‑running Python
script that monitors server resources. Since the script must run
continuously and interact with network services, it may
occasionally experience transient errors. The administrator wants
the script to log any such errors and automatically recover without
crashing.


Question:
Which error‑handling mechanism is most appropriate to ensure
robust logging and recovery in this scenario?


©2025

,A. A bare `except` clause that catches all exceptions without
logging
B. A `try/except` block that specifically catches transient errors,
logs the error, and then pauses before retrying
C. Terminating the script immediately upon encountering any
exception
D. Using `try/except` and calling `sys.exit()` after logging the
error


Correct ANS: B. A `try/except` block that specifically
catches transient errors, logs the error, and then pauses before
retrying


Rationale:
Option B isolates only the expected transient exceptions, logs
relevant details for later review, and uses a retry mechanism
(often via a sleep‑backoff) to maintain continuous operation. This
approach prevents the entire application from crashing while still
capturing error information for debugging.


---


Question 2 (Fill in the Blank)
Case:
©2025

,A developer is organizing utility functions into separate files to
promote code reuse and modularity in a Python application. To
use the functions defined in another file, the appropriate
mechanism must be invoked.


Statement:
To include definitions from an external module in Python, the
developer uses the ______ keyword.


Correct ANS: import


Rationale:
The `import` directive in Python allows one file (module) to
include code from another. This practice promotes reuse and clean
separation of functionality across the application.


---


Question 3 (True/False)
Case:
A Node.js developer replaces synchronous file I/O functions with
their asynchronous counterparts to improve application
responsiveness.

©2025

, Statement:
Asynchronous non‑blocking I/O in Node.js enables the event loop
to service multiple network requests concurrently, thereby
improving overall performance.


Correct ANS: True


Rationale:
Node.js relies on an event‑driven non‑blocking I/O model. This
design allows the application to handle many requests
simultaneously without being stalled by slow operations, thereby
enhancing performance and scalability.


---


Question 4 (Multiple Response)
Case:
A developer is using Python's asynchronous programming
features to build a web scraper that collects data from multiple
websites concurrently. This involves restructuring the code using
`async` and `await`.



©2025

Document information

Uploaded on
April 28, 2025
Number of pages
50
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown
$12.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.
emiliophd
3.4
(21)
Sold
191
Followers
46
Items
4725
Last sold
1 month 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