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 4 out of 39 pages
Exam (elaborations)

WGU D278 Scripting and Programming Foundations Objective Assessment Prep Exam Actual Exam 2026/2027 – Complete Exam-Style Questions | Detailed Rationales – Pass Guaranteed – A+ Graded

Document preview thumbnail
Preview 4 out of 39 pages

WGU D278 Scripting and Programming Foundations Objective Assessment Exam Actual Exam 2026/2027 – Real-Style Questions with Answers | 100% Correct | Programming Fundamentals, Variables, Data Types, Control Structures, Functions | Graded A+ Verified | Scripting Languages, Syntax, Logic, Debugging, Problem-Solving, Algorithms | Detailed Rationales | Verified Correct Answers – Pass Guaranteed – Instant Download

Content preview

WGU D278 Objective Assessment Prep (Latest 2026/2027 Update) Scripting and Programming - Foundations | Questions and Verified Answers| 100%
Correct| Grade A 2026/2027 | Page 1 | Passing Score: 80%

WESTERN GOVERNORS UNIVERSITY
WGU D278 Objective Assessment Prep (Latest 2026/2027 Update)
Scripting and Programming - Foundations | Questions and
Verified Answers| 100% Correct| Grade A
2026/2027 Edition - Official Exam 2026/2027

75 80% N/A
QUESTIONS PASSING SCORE RECERTIFICATION


INCLUDES DETAILED ANSWERS WITH RATIONALE FOR EVERY QUESTION
TABLE OF CONTENTS

Section 1 Programming Fundamentals and Logic Q1-Q15


Section 2 Data Types, Variables, and Operators Q16-Q30


Section 3 Control Structures (Loops and Conditionals) Q31-Q45


Section 4 Functions and Modular Programming Q46-Q60


Section 5 Arrays, Lists, and Basic Data Structures Q61-Q75


Instructions: Select the single best answer for each question. This exam is designed for WGU D278 Scripting and Programming -
Foundations certification preparation. Passing score: 80% (60 questions correct).




WGU D278 Scripting and Programming - Foundations - 2026/2027 | Passing Score: 80% | Page 1 of 39

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q1 Question 1 of 75
A software developer is explaining the concept of algorithms to a new team member. She
describes an algorithm as a finite set of well-defined instructions that produces a result and
terminates after a specific number of steps. This definition emphasizes which fundamental
property of algorithms?

A. Finiteness
B. Determinism
C. Efficiency
D. Generality


Correct Answer: A

Rationale:
Finiteness is the property that an algorithm must terminate after a finite number of steps. Determinism
means each step has exactly one next step. Efficiency refers to resource usage. Generality means the
algorithm applies to a class of problems, not just one specific input.




Q2 Question 2 of 75
A programmer writes a flowchart that includes a diamond-shaped symbol at a decision point
where the process can follow two different paths. This diamond symbol represents which
programming concept?

A. A process or computation step
B. A decision or conditional branch
C. An input or output operation
D. A terminal start or end point


Correct Answer: B

Rationale:
In standard flowchart notation, a diamond shape represents a decision point where the flow can branch
based on a condition (true/false or yes/no). Rectangles represent processes, parallelograms represent
input/output, and ovals represent terminals (start/end).




WGU D278 Scripting and Programming - Foundations - 2026/2027 | Passing Score: 80% | Page 2 of 39

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q3 Question 3 of 75
A student is learning about programming paradigms and encounters the term 'declarative
programming.' The instructor explains that in declarative programming, the programmer
describes what the program should accomplish rather than how to accomplish it. Which of
these is an example of a declarative approach?

A. Writing a loop that iterates through a list to find a maximum value
B. Writing a function that manually sorts an array using bubble sort
C. Writing a SQL query that selects records where age is greater than 30
D. Writing a recursive function to compute factorial


Correct Answer: C

Rationale:
SQL is a declarative language where you specify what data you want (records where age > 30) without
specifying how the database engine should retrieve it. The other options all describe the step-by-step
procedure (how), which is characteristic of imperative programming.




Q4 Question 4 of 75
A development team is discussing the software development life cycle. The team lead
explains that identifying what the software needs to do and documenting those requirements
happens before any code is written. This describes which phase?

A. Implementation phase
B. Testing phase
C. Maintenance phase
D. Requirements analysis phase


Correct Answer: D

Rationale:
Requirements analysis is the phase where the software's needed functionality is identified and documented
before coding begins. Implementation is writing the actual code. Testing verifies the code works correctly.
Maintenance involves updates after deployment.




WGU D278 Scripting and Programming - Foundations - 2026/2027 | Passing Score: 80% | Page 3 of 39

,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027


Q5 Question 5 of 75
A programmer is tracing through a piece of pseudocode and encounters the expression: (5 +
3) * 2 - . Assuming standard order of operations, the result of this expression is

A. 14
B. 12
C. 16
D. 8


Correct Answer: A

Rationale:
Following the order of operations: first (5+3)=8, then 8*2=16, then 4/2=2, and finally 16-2=14. Multiplication
and division are evaluated left to right before subtraction. The parentheses force the addition to happen first.




Q6 Question 6 of 75
A programmer creates a variable naming convention where constants are written in
ALL_CAPS with underscores, such as MAX_RETRY_COUNT. This naming convention is
commonly used in many programming languages to indicate that a value

A. Should be stored in a database
B. Is a constant that should not be modified during program execution
C. Represents a global variable accessible from any function
D. Is a temporary variable used only within a single loop iteration


Correct Answer: B

Rationale:
The ALL_CAPS with underscores naming convention signals to other developers that the value is a constant
- a value that remains unchanged throughout program execution. This convention improves code readability
and helps prevent accidental modification of important fixed values.




WGU D278 Scripting and Programming - Foundations - 2026/2027 | Passing Score: 80% | Page 4 of 39

Document information

Uploaded on
June 5, 2026
Number of pages
39
Written in
2025/2026
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.
STUVIAACTUALEXAMS
3.5
(156)
Sold
1202
Followers
205
Items
8720
Last sold
9 hours 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