WGU D278 Scripting & Programming
Foundations Exam Complete Exam-
Style Questions with Detailed
Rationales 2026/2027 Edition | A+
Graded | Pass Guaranteed
1. What is an algorithm?
A. A programming language
B. A sequence of steps used to solve a problem
C. A compiler error
D. A database table
-VERIFIED ANSWER-: B
Rationale: An algorithm is a step-by-step procedure for solving a
problem or accomplishing a task. It is independent of any specific
programming language.
2. Which SDLC phase focuses on gathering requirements?
A. Maintenance
B. Testing
C. Analysis
D. Deployment
,-VERIFIED ANSWER-: C
Rationale: The Analysis phase identifies business needs, user
requirements, and project goals before development begins.
3. Which data type stores True or False values?
A. Integer
B. Boolean
C. String
D. Float
-VERIFIED ANSWER-: B
Rationale: Boolean variables hold only two possible values: True or
False.
4. What is the output?
x = 5
y = 3
print(x + y)
A. 53
B. 8
C. 15
D. Error
-VERIFIED ANSWER-: B
Rationale: Addition of 5 and 3 equals 8.
, 5. Which control structure is used for decision-making?
A. Variable
B. Function
C. If statement
D. Array
-VERIFIED ANSWER-: C
Rationale: An if statement evaluates a condition and executes code
based on the result.
6. What is the purpose of a variable?
A. Store data in memory
B. Display output only
C. Compile code
D. Create loops
-VERIFIED ANSWER-: A
Rationale: Variables hold values that may change during program
execution.
7. Which loop guarantees at least one execution?
A. For loop
B. While loop
C. Do-while loop
D. Nested loop
Foundations Exam Complete Exam-
Style Questions with Detailed
Rationales 2026/2027 Edition | A+
Graded | Pass Guaranteed
1. What is an algorithm?
A. A programming language
B. A sequence of steps used to solve a problem
C. A compiler error
D. A database table
-VERIFIED ANSWER-: B
Rationale: An algorithm is a step-by-step procedure for solving a
problem or accomplishing a task. It is independent of any specific
programming language.
2. Which SDLC phase focuses on gathering requirements?
A. Maintenance
B. Testing
C. Analysis
D. Deployment
,-VERIFIED ANSWER-: C
Rationale: The Analysis phase identifies business needs, user
requirements, and project goals before development begins.
3. Which data type stores True or False values?
A. Integer
B. Boolean
C. String
D. Float
-VERIFIED ANSWER-: B
Rationale: Boolean variables hold only two possible values: True or
False.
4. What is the output?
x = 5
y = 3
print(x + y)
A. 53
B. 8
C. 15
D. Error
-VERIFIED ANSWER-: B
Rationale: Addition of 5 and 3 equals 8.
, 5. Which control structure is used for decision-making?
A. Variable
B. Function
C. If statement
D. Array
-VERIFIED ANSWER-: C
Rationale: An if statement evaluates a condition and executes code
based on the result.
6. What is the purpose of a variable?
A. Store data in memory
B. Display output only
C. Compile code
D. Create loops
-VERIFIED ANSWER-: A
Rationale: Variables hold values that may change during program
execution.
7. Which loop guarantees at least one execution?
A. For loop
B. While loop
C. Do-while loop
D. Nested loop