• 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 3 out of 23 pages
Exam (elaborations)

Wgu D278 Midterm Exam: Scripting And Programming Foundations Questions With Verified Answers And Detailed Explanations. 2026/2027

Document preview thumbnail
Preview 3 out of 23 pages

Wgu D278 Midterm Exam: Scripting And Programming Foundations Questions With Verified Answers And Detailed Explanations. 2026/2027

Content preview

WGU D278 MIDTERM EXAM:
SCRIPTING AND PROGRAMMING
FOUNDATIONS QUESTIONS WITH
VERIFIED ANSWERS AND DETAILED
EXPLANATIONS. 2026/2027


1. A developer is analyzing an algorithm that splits a dataset in half during each iteration to

find a target value. If the input size doubles, the number of operations increases by only one.

What is the Big O complexity?

A. O(1)


B. O(log n)


C. O(n)


D. O(n^2)


Answer: B


Conceptual Explanation: Logarithmic time complexity O(log n) occurs when the problem

size is reduced by a constant factor (usually half) in each step.


2. Which phase of the Software Development Life Cycle (SDLC) involves creating flowcharts

and pseudocode before any actual code is written?

A. Design

,B. Analysis


C. Implementation


D. Testing


Answer: A


Conceptual Explanation: The Design phase focuses on the technical architecture,

including algorithms, data structures, and logic flow using tools like pseudocode.


3. Consider a function with a local variable and a global variable of the same name. Which

value is accessed if the name is referenced inside the function?

A. The local variable


B. The global variable


C. A syntax error occurs


D. Both variables are updated simultaneously


Answer: A


Conceptual Explanation: Local scope takes precedence over global scope within the

context of a function; this is often referred to as variable shadowing.


4. In the context of algorithm efficiency, which of the following best describes the ‘worst-

case’ scenario?

A. The minimum time required to execute


B. The average time required for random inputs

, C. The memory space required by the stack


D. The upper bound on the time required for any input of size n


Answer: D


Conceptual Explanation: The worst-case scenario represents the maximum resources

(usually time) an algorithm will ever need for a specific input size.


5. Which of the following is a primary disadvantage of using a compiled language compared

to an interpreted language?

A. Required translation step before execution


B. Easier debugging process


C. Slower execution speed


D. Implicit data typing


Answer: A


Conceptual Explanation: Compiled languages must be fully converted into machine code

by a compiler before they can run, which adds a build step to the workflow.


6. What is the result of the Boolean expression: (NOT (True AND False)) OR (False AND True)?

A. Error


B. False


C. Null

Document information

Uploaded on
October 14, 2026
Number of pages
23
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.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.
TheStar
3.7
(140)
Sold
736
Followers
178
Items
28662
Last sold
1 day 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