WGU D278 FINAL EXAM PREP -
SCRIPTING AND PROGRAMMING
FOUNDATIONS QUESTIONS WITH
VERIFIED ANSWERS 2026/2027
1. Which of the following describes a high-level programming language?
A. Code that consists of 0s and 1s and is executed directly by the CPU.
B. A language that uses mnemonics to represent machine instructions.
C. Hardware-specific instructions that do not require a compiler.
D. A language that is closer to human language and must be translated to run.
Answer: D
Conceptual Explanation: High-level languages like Python or Java are abstraction-heavy,
making them easier for humans to read but requiring a compiler or interpreter to convert
them into machine-level code.
2. In the Software Development Life Cycle (SDLC), during which phase are user requirements
gathered and documented?
A. Design
B. Implementation
C. Analysis
,D. Testing
Answer: C
Conceptual Explanation: The Analysis phase focuses on determining the goals of the
project and identifying the specific requirements of the end-users.
3. What is the primary difference between a compiler and an interpreter?
A. An interpreter runs faster than a compiled program because it bypasses machine code.
B. Interpreters produce a standalone executable file; compilers do not.
C. Compilers are used only for low-level languages like Assembly.
D. A compiler translates the entire program at once, while an interpreter translates line-by-
line.
Answer: D
Conceptual Explanation: Compilers translate high-level source code into machine code all
at once before execution, whereas interpreters translate and execute code line-by-line
during runtime.
4. Which logic gate outputs TRUE only if all inputs are TRUE?
A. OR
B. XOR
C. NOT
D. AND
, Answer: D
Conceptual Explanation: The AND gate requires every input to be 1 (TRUE) for the output
to be 1.
5. In a flowchart, which symbol is typically used to represent a decision process?
A. Rectangle
B. Oval
C. Parallelogram
D. Diamond
Answer: D
Conceptual Explanation: The diamond symbol represents a branching point or decision,
usually involving a True/False or Yes/No outcome.
6. Which of the following is an example of a syntax error?
A. Dividing a number by zero.
B. Forgetting a closing parenthesis in a function call.
C. Using a variable that has not been defined.
D. Calculating the area of a circle using the wrong formula.
Answer: B
SCRIPTING AND PROGRAMMING
FOUNDATIONS QUESTIONS WITH
VERIFIED ANSWERS 2026/2027
1. Which of the following describes a high-level programming language?
A. Code that consists of 0s and 1s and is executed directly by the CPU.
B. A language that uses mnemonics to represent machine instructions.
C. Hardware-specific instructions that do not require a compiler.
D. A language that is closer to human language and must be translated to run.
Answer: D
Conceptual Explanation: High-level languages like Python or Java are abstraction-heavy,
making them easier for humans to read but requiring a compiler or interpreter to convert
them into machine-level code.
2. In the Software Development Life Cycle (SDLC), during which phase are user requirements
gathered and documented?
A. Design
B. Implementation
C. Analysis
,D. Testing
Answer: C
Conceptual Explanation: The Analysis phase focuses on determining the goals of the
project and identifying the specific requirements of the end-users.
3. What is the primary difference between a compiler and an interpreter?
A. An interpreter runs faster than a compiled program because it bypasses machine code.
B. Interpreters produce a standalone executable file; compilers do not.
C. Compilers are used only for low-level languages like Assembly.
D. A compiler translates the entire program at once, while an interpreter translates line-by-
line.
Answer: D
Conceptual Explanation: Compilers translate high-level source code into machine code all
at once before execution, whereas interpreters translate and execute code line-by-line
during runtime.
4. Which logic gate outputs TRUE only if all inputs are TRUE?
A. OR
B. XOR
C. NOT
D. AND
, Answer: D
Conceptual Explanation: The AND gate requires every input to be 1 (TRUE) for the output
to be 1.
5. In a flowchart, which symbol is typically used to represent a decision process?
A. Rectangle
B. Oval
C. Parallelogram
D. Diamond
Answer: D
Conceptual Explanation: The diamond symbol represents a branching point or decision,
usually involving a True/False or Yes/No outcome.
6. Which of the following is an example of a syntax error?
A. Dividing a number by zero.
B. Forgetting a closing parenthesis in a function call.
C. Using a variable that has not been defined.
D. Calculating the area of a circle using the wrong formula.
Answer: B