WGU D278 SCRIPTING AND
PROGRAMMING FOUNDATIONS EXAM
REVIEW QUESTIONS WITH VERIFIED
ANSWERS AND DETAILED
EXPLANATIONS. 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) involves creating the technical
specifications for a system, including data models and pseudocode?
A. Design phase
B. Implementation phase
C. Analysis phase
D. Testing phase
Answer: A
Conceptual Explanation: The Design phase is where developers define the system
architecture and detailed logic, such as pseudocode and database schemas, before actual
coding begins.
2. In a flowchart, which symbol is used to represent a decision point?
A. Rectangle
B. Parallelogram
,C. Diamond
D. Oval
Answer: C
Conceptual Explanation: The diamond shape represents a decision or branching point in
a flowchart, typically containing a boolean expression.
3. What is the primary difference between a compiler and an interpreter?
A. An interpreter translates the entire program before execution, while a compiler
translates line-by-line.
B. A compiler translates the entire source code into machine code before execution, while
an interpreter translates and executes line-by-line.
C. Compilers are only used for low-level languages, while interpreters are used for high-
level languages.
D. There is no difference; the terms are synonymous in modern programming.
Answer: B
Conceptual Explanation: Compilers generate a standalone executable by processing the
whole file, whereas interpreters read and execute code on the fly.
4. Which type of error occurs when a programmer uses a variable that has not been
initialized, leading to a program crash during execution?
A. Syntax error
, B. Logic error
C. Compilation error
D. Runtime error
Answer: D
Conceptual Explanation: A runtime error happens while the program is running, often
caused by operations that are impossible to perform, like accessing a null reference or
dividing by zero.
5. In Boolean logic, which gate outputs true ONLY if both inputs are true?
A. OR
B. XOR
C. NOT
D. AND
Answer: D
Conceptual Explanation: The AND gate requires all inputs to be true to result in a true
output.
6. What is the result of the following pseudocode: x = 10; y = 20; x = y; y = x; Print x, y
A. 10, 20
B. 20, 10
PROGRAMMING FOUNDATIONS EXAM
REVIEW QUESTIONS WITH VERIFIED
ANSWERS AND DETAILED
EXPLANATIONS. 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) involves creating the technical
specifications for a system, including data models and pseudocode?
A. Design phase
B. Implementation phase
C. Analysis phase
D. Testing phase
Answer: A
Conceptual Explanation: The Design phase is where developers define the system
architecture and detailed logic, such as pseudocode and database schemas, before actual
coding begins.
2. In a flowchart, which symbol is used to represent a decision point?
A. Rectangle
B. Parallelogram
,C. Diamond
D. Oval
Answer: C
Conceptual Explanation: The diamond shape represents a decision or branching point in
a flowchart, typically containing a boolean expression.
3. What is the primary difference between a compiler and an interpreter?
A. An interpreter translates the entire program before execution, while a compiler
translates line-by-line.
B. A compiler translates the entire source code into machine code before execution, while
an interpreter translates and executes line-by-line.
C. Compilers are only used for low-level languages, while interpreters are used for high-
level languages.
D. There is no difference; the terms are synonymous in modern programming.
Answer: B
Conceptual Explanation: Compilers generate a standalone executable by processing the
whole file, whereas interpreters read and execute code on the fly.
4. Which type of error occurs when a programmer uses a variable that has not been
initialized, leading to a program crash during execution?
A. Syntax error
, B. Logic error
C. Compilation error
D. Runtime error
Answer: D
Conceptual Explanation: A runtime error happens while the program is running, often
caused by operations that are impossible to perform, like accessing a null reference or
dividing by zero.
5. In Boolean logic, which gate outputs true ONLY if both inputs are true?
A. OR
B. XOR
C. NOT
D. AND
Answer: D
Conceptual Explanation: The AND gate requires all inputs to be true to result in a true
output.
6. What is the result of the following pseudocode: x = 10; y = 20; x = y; y = x; Print x, y
A. 10, 20
B. 20, 10