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

IT-ITSW 2120(D276) Web Development Foundations Latest OA Guide 2025

Rating
-
Sold
-
Pages
30
Uploaded on
09-05-2025
Written in
2024/2025

IT-ITSW 2120(D276) Web Development Foundations Latest OA Guide 2025IT-ITSW 2120(D276) Web Development Foundations Latest OA Guide 2025IT-ITSW 2120(D276) Web Development Foundations Latest OA Guide 2025











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

Document information

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

Subjects

Content preview

IT – D276 ITSW 2120

Web Development 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 key property of pure functions—it
guarantees that a function, when given the same input, will always return
the same output and will not alter any external state. This leads to easier
debugging and testing.

---

Question 2:
In dynamically typed scripting languages, what does it mean for functions
to be "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. Their execution is prioritized over other tasks.
- D. They are stored in a dedicated function registry.

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 that they can be
manipulated like any other data type. This capability is pivotal in
functional programming paradigms and supports higher-order functions.

---
©2025

, Question 3:
Which type of function enables developers in Python to create small,
anonymous functions in a single expression?
- A. Decorator functions
- B. Lambda functions
- C. Recursive functions
- D. Generator functions

Correct ANS: B. Lambda functions
Rationale:
Lambda functions provide a concise way to write anonymous functions in
Python. They are typically used for simple operations, especially as inline
arguments to higher-order functions.

---

Question 4:
What term describes a function that captures the variables from its
lexical scope even when executed outside its original environment?
- A. Closure
- B. Coroutine
- C. Recursion
- D. Callback

Correct ANS: A. Closure
Rationale:
A closure is a function paired with an environment that binds its free
variables. It “remembers” the context in which it was created, even when
used outside that scope, allowing for data encapsulation.

---

Question 5:
One major disadvantage of using recursion over iterative loops in
©2025

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.
Bankart Chamberlain College of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
143
Member since
2 year
Number of followers
31
Documents
4502
Last sold
3 days ago

3.6

21 reviews

5
9
4
0
3
9
2
1
1
2

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