WGU D278 SCRIPTING AND
PROGRAMMING FOUNDATIONS
PRACTICE EXAM QUESTIONS WITH
VERIFIED ANSWERS AND DETAILED
EXPLANATIONS. 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) involves creating flowcharts
and pseudocode to plan the logic of a program?
A. Design
B. Analysis
C. Implementation
D. Testing
Answer: A
Conceptual Explanation: The Design phase is where the logical structure, algorithms, and
flow of the program are planned before writing code.
2. What is the primary difference between a compiled language and an interpreted language?
A. Interpreted languages run faster than compiled languages because they don’t need a
build step.
,B. Compiled languages are translated into machine code once before execution, while
interpreted languages are translated line-by-line during execution.
C. Compiled languages do not require a compiler.
D. Only interpreted languages can use variables.
Answer: B
Conceptual Explanation: Compilation converts the entire source code into machine code
ahead of time, whereas interpretation happens at runtime, line by line.
3. In programming, what is the result of the logical expression: (True AND False) OR (NOT
False)?
A. False
B. True
C. Null
D. Error
Answer: B
Conceptual Explanation: (True AND False) is False. (NOT False) is True. False OR True
results in True.
4. Which data structure is best suited for storing a collection of unique elements where order
does not matter?
A. Array
, B. Set
C. List
D. Stack
Answer: B
Conceptual Explanation: A Set is a collection that specifically stores unique elements and
typically does not guarantee a specific order.
5. What occurs when a loop’s terminating condition is never met?
A. Syntax error
B. Infinite loop
C. Compiler warning
D. Recursive call
Answer: B
Conceptual Explanation: An infinite loop occurs when the loop continues to execute
indefinitely because the condition to stop it is never satisfied.
6. Which of the following is a characteristic of a ‘statically typed’ programming language?
A. Variable types are determined at runtime.
B. Variable types are checked at compile-time.
C. Variables can change types freely during execution.
PROGRAMMING FOUNDATIONS
PRACTICE EXAM QUESTIONS WITH
VERIFIED ANSWERS AND DETAILED
EXPLANATIONS. 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) involves creating flowcharts
and pseudocode to plan the logic of a program?
A. Design
B. Analysis
C. Implementation
D. Testing
Answer: A
Conceptual Explanation: The Design phase is where the logical structure, algorithms, and
flow of the program are planned before writing code.
2. What is the primary difference between a compiled language and an interpreted language?
A. Interpreted languages run faster than compiled languages because they don’t need a
build step.
,B. Compiled languages are translated into machine code once before execution, while
interpreted languages are translated line-by-line during execution.
C. Compiled languages do not require a compiler.
D. Only interpreted languages can use variables.
Answer: B
Conceptual Explanation: Compilation converts the entire source code into machine code
ahead of time, whereas interpretation happens at runtime, line by line.
3. In programming, what is the result of the logical expression: (True AND False) OR (NOT
False)?
A. False
B. True
C. Null
D. Error
Answer: B
Conceptual Explanation: (True AND False) is False. (NOT False) is True. False OR True
results in True.
4. Which data structure is best suited for storing a collection of unique elements where order
does not matter?
A. Array
, B. Set
C. List
D. Stack
Answer: B
Conceptual Explanation: A Set is a collection that specifically stores unique elements and
typically does not guarantee a specific order.
5. What occurs when a loop’s terminating condition is never met?
A. Syntax error
B. Infinite loop
C. Compiler warning
D. Recursive call
Answer: B
Conceptual Explanation: An infinite loop occurs when the loop continues to execute
indefinitely because the condition to stop it is never satisfied.
6. Which of the following is a characteristic of a ‘statically typed’ programming language?
A. Variable types are determined at runtime.
B. Variable types are checked at compile-time.
C. Variables can change types freely during execution.