100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

ECE 105 Programming for Engineers II - Final Exam Review (Qns & Ans) - DU 2025

Rating
-
Sold
-
Pages
28
Uploaded on
18-06-2025
Written in
2024/2025

ECE 105 Programming for Engineers II - Final Exam Review (Qns & Ans) - DU 2025ECE 105 Programming for Engineers II - Final Exam Review (Qns & Ans) - DU 2025ECE 105 Programming for Engineers II - Final Exam Review (Qns & Ans) - DU 2025

Show more Read less










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 18, 2025
Number of pages
28
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

Subjects

Content preview

ECE 105
Programming for Engineers II
Final Exam Review

(Questions & Solutions)

2025




1

, Section I – Multiple Choice (8 Questions)

Question 1:
Which of the following best describes the purpose of using decorators in
Python?
A. To improve runtime performance by compiling functions
B. To dynamically modify or enhance the behavior of functions or
methods without changing their code
C. To optimize memory usage in large-scale computations
D. To enforce strict data type checking at runtime

ANS: B
Rationale: Decorators are used to wrap a function, method, or class,
thereby extending or altering its behavior at runtime without modifying
its source code—a powerful tool for logging, access control, or caching.

---

Question 2:
In the context of scientific computing with Python, which library is most
commonly used for large-scale numerical operations on arrays and
matrices?
A. Matplotlib
B. NumPy
C. Pandas
D. SciPy

ANS: B
Rationale: NumPy provides a powerful N-dimensional array object and
a collection of routines for fast operations on arrays; it serves as the
foundational library for numerical computing and is extensively used in
engineering applications.


2

, ---

Question 3:
When designing an object-oriented program in Python for modeling an
engineering system, which feature allows for the creation of classes that
derive properties and behaviors from a parent class?
A. Encapsulation
B. Inheritance
C. Polymorphism
D. Abstraction

ANS: B
Rationale: Inheritance allows a class (or subclass) to derive attributes
and methods from a parent (base) class, promoting reusability and
hierarchical organization—a key concept in object-oriented design.

---

Question 4:
Which exception is raised in Python when a requested key is not found in
a dictionary?
A. IndexError
B. KeyError
C. NameError
D. ValueError

ANS: B
Rationale: A KeyError is raised when an operation or lookup in a
dictionary fails because the key is not present, allowing proper error
handling in programs that rely on dictionary data structures.

---

Question 5:
In Python’s memory management, what is the primary mechanism used
3

Get to know the seller

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.
ClementeBSC Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
12
Member since
3 year
Number of followers
7
Documents
3977
Last sold
10 months ago

Hi there! I'm a former nursing student who loves to share my knowledge and experience with others. I have a collection of study notes and papers that I've written for various courses and programs, and I'm selling them for a reasonable price. Whether you need help with anatomy, pharmacology, ethics, or anything else, I've got you covered. My notes are clear, concise, and fun to read. They will help you ace your exams and assignments, and maybe even make you laugh along the way. If you're interested, check out my profile and contact me. I'm looking forward to hearing from you!

Read more Read less
4.0

2 reviews

5
1
4
0
3
1
2
0
1
0

Recently viewed by you

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

Frequently asked questions