WGU D278 SCRIPTING AND
PROGRAMMING - FOUNDATIONS
FINAL EXAM PREP QUESTIONS WITH
VERIFIED ANSWERS 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) focuses on determining the
specific features and functions the final product must have based on stakeholder needs?
A. Analysis
B. Implementation
C. Design
D. Maintenance
Answer: A
Conceptual Explanation: The Analysis phase involves gathering requirements from
stakeholders to define the system’s goals and functional requirements.
2. In programming logic, which operator will result in true only if both operands are true?
A. OR
B. NOT
C. AND
D. XOR
,Answer: C
Conceptual Explanation: The AND operator requires both inputs to be true for the output
to be true.
3. Which data type is most appropriate for a variable storing the price of a retail item, such as
19.99?
A. Integer
B. Boolean
C. String
D. Float
Answer: D
Conceptual Explanation: Floating-point (Float) data types are used for numbers that
require decimal precision.
4. A programmer discovers that their code runs but produces the wrong mathematical result.
Which type of error is this?
A. Syntax Error
B. Logic Error
C. Runtime Error
D. Compilation Error
Answer: B
, Conceptual Explanation: Logic errors occur when the program runs without crashing but
produces incorrect output due to flawed reasoning.
5. In a flowchart, what does a diamond shape represent?
A. Start/End
B. Process/Task
C. Decision
D. Input/Output
Answer: C
Conceptual Explanation: The diamond shape is the standard flowchart symbol for a
decision point, usually resulting in a Yes/No or True/False branch.
6. What is the value of the expression (15 % 4)?
A. 1
B. 3
C. 0
D. 4
Answer: B
Conceptual Explanation: The modulo operator (%) returns the remainder of a division.
15 divided by 4 is 3 with a remainder of 3.
PROGRAMMING - FOUNDATIONS
FINAL EXAM PREP QUESTIONS WITH
VERIFIED ANSWERS 2026/2027
1. Which phase of the Software Development Life Cycle (SDLC) focuses on determining the
specific features and functions the final product must have based on stakeholder needs?
A. Analysis
B. Implementation
C. Design
D. Maintenance
Answer: A
Conceptual Explanation: The Analysis phase involves gathering requirements from
stakeholders to define the system’s goals and functional requirements.
2. In programming logic, which operator will result in true only if both operands are true?
A. OR
B. NOT
C. AND
D. XOR
,Answer: C
Conceptual Explanation: The AND operator requires both inputs to be true for the output
to be true.
3. Which data type is most appropriate for a variable storing the price of a retail item, such as
19.99?
A. Integer
B. Boolean
C. String
D. Float
Answer: D
Conceptual Explanation: Floating-point (Float) data types are used for numbers that
require decimal precision.
4. A programmer discovers that their code runs but produces the wrong mathematical result.
Which type of error is this?
A. Syntax Error
B. Logic Error
C. Runtime Error
D. Compilation Error
Answer: B
, Conceptual Explanation: Logic errors occur when the program runs without crashing but
produces incorrect output due to flawed reasoning.
5. In a flowchart, what does a diamond shape represent?
A. Start/End
B. Process/Task
C. Decision
D. Input/Output
Answer: C
Conceptual Explanation: The diamond shape is the standard flowchart symbol for a
decision point, usually resulting in a Yes/No or True/False branch.
6. What is the value of the expression (15 % 4)?
A. 1
B. 3
C. 0
D. 4
Answer: B
Conceptual Explanation: The modulo operator (%) returns the remainder of a division.
15 divided by 4 is 3 with a remainder of 3.