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
TABLE OF CONTENTS
Section 1 Programming Fundamentals and Logic Q1-15
Section 2 Data Types, Variables, and Operators Q16-30
Section 3 Control Structures (Loops and Conditionals) Q31-45
Section 4 Functions and Modular Programming Q46-60
Section 5 Arrays, Lists, and Basic Data Structures Q61-75
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).
278 Objective Assessment Prep (Latest 2026/2027 Update) Scripting and Programming - Foundations | Questions and Verified Answers| 100% Correct| Grade A 2026/2027 | Page 1 | Passing Sco
,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027
Q1 Question 1 of 75
Q1. A software developer explains that an algorithm must produce a result in a finite number
of steps. This characteristic is best described as which property of algorithms?
A. Finiteness
B. Efficiency
C. Portability
D. Simplicity
Correct Answer: A
Rationale:
Finiteness means an algorithm must terminate after a bounded number of steps, directly matching the
developer's description. Efficiency concerns resource usage rather than termination, so it does not
describe this property.
Q2 Question 2 of 75
Q2. A programmer is writing pseudocode for a payroll application and needs to represent a
decision point where an employee who works more than 40 hours receives overtime pay.
Which pseudocode construct is most appropriate?
A. WHILE-DO
B. IF-THEN-ELSE
C. FOR-DO
D. SEQUENCE
Correct Answer: B
Rationale:
An IF-THEN-ELSE construct evaluates a condition and selects between two paths, exactly matching the
overtime decision. A WHILE-DO repeats a block, which is unnecessary for a single conditional branch.
WGU D278 Scripting and Programming - Foundations — 2026/2027 | Passing Score: 80% | Page 2 of 32
,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027
Q3 Question 3 of 75
Q3. A student traces through a flowchart and encounters a diamond-shaped symbol. This
symbol in a standard flowchart represents which of the following?
A. A process or calculation step
B. A connector to another page
C. A decision or conditional branch
D. An input or output operation
Correct Answer: C
Rationale:
In standard flowchart notation, a diamond shape denotes a decision point where the flow branches
based on a condition. A rectangle represents a process, and a parallelogram represents input/output.
Q4 Question 4 of 75
Q4. A team lead reviews a requirements document and notices the specification states that
the system shall allow up to 500 concurrent users. This requirement is best classified as
which type?
A. Functional requirement
B. Business rule
C. User story
D. Non-functional requirement
Correct Answer: D
Rationale:
A constraint on system capacity such as 'up to 500 concurrent users' describes a performance
characteristic, making it a non-functional requirement. A functional requirement describes what the
system does, not how well it performs.
WGU D278 Scripting and Programming - Foundations — 2026/2027 | Passing Score: 80% | Page 3 of 32
,SECTION 1 | Programming Fundamentals and Logic | Q1-Q15 | WGU D278 Scripting and Programming - Foundations 2026/2027
Q5 Question 5 of 75
Q5. A developer encounters a syntax error while compiling a program. The compiler reports
an unexpected token on line 12. Syntax errors are caught during which phase of program
execution?
A. Compilation phase
B. Linking phase
C. Execution phase
D. Testing phase
Correct Answer: A
Rationale:
Syntax errors are detected by the compiler during the compilation phase before the program ever runs.
Runtime errors, by contrast, occur during the execution phase after compilation succeeds.
Q6 Question 6 of 75
Q6. A junior developer asks why variable names cannot begin with a digit in most
programming languages. The most accurate explanation is that allowing digits at the start
would create which problem?
A. Memory allocation conflicts
B. Ambiguity between numbers and identifiers
C. Compiler performance degradation
D. Operating system restrictions
Correct Answer: B
Rationale:
If identifiers could start with a digit, the compiler could not distinguish '2nd' as a variable name from a
numeric literal followed by other characters. This ambiguity is why most languages reserve leading digits
for numeric literals.
WGU D278 Scripting and Programming - Foundations — 2026/2027 | Passing Score: 80% | Page 4 of 32