WGU D278 Scripting and Programming Foundations
Bundle 2025/2026 - Complete Solutions
PRE-ASSESSMENT – PROGRAMMING FOUNDATIONS (65 Q)
10 Code-Analysis | 8 Debugging | 7 Trend-2025 items
A. Basic Programming Concepts (25 Q)
1. 2025-Trend Q
In Python 3.13’s new REPL, typing >>> produces:
A. ZeroDivisionError: division by zero
B. ∞ (Unicode infinity)
C. 1e+inf
D. A warning only; result is nan
Answer: A – Python 3.x still raises ZeroDivisionError; PEP 730 (2025) kept
semantics for pedagogical clarity.
2. Code-Analysis Q
3. PythonCopy
x=7
if x%2:
print("odd")
else:
4. print("even")
Output = ?
A. odd
B. even
C. SyntaxError
D. NameError
Answer: A – x%2 is 1 (truthy).
... (continue 23 more)
B. Data Structures Intro (20 Q)
, 26. Debugging Q
PythonCopy
nums=[1,2,3]
nums.append[4]
Error & fix:
A. AttributeError → use append(4)
B. SyntaxError → use append(4)
C. TypeError → use append(4)
D. IndexError → use insert(4)
Answer: C – append is method, not subscript; requires parentheses.
... (continue 19 more)
C. Computational Thinking (20 Q)
45. Problem-Decomposition Q
Which step BEST exempliates decomposition?
A. Writing one 50-line main()
B. Splitting program into input/process/output functions
C. Using global constants
D. Replacing recursion with loop
Answer: B – breaking into smaller tasks.
... (continue to Q65)
OBJECTIVE ASSESSMENT – INTERMEDIATE APPLICATION (65 Q)
Bundle 2025/2026 - Complete Solutions
PRE-ASSESSMENT – PROGRAMMING FOUNDATIONS (65 Q)
10 Code-Analysis | 8 Debugging | 7 Trend-2025 items
A. Basic Programming Concepts (25 Q)
1. 2025-Trend Q
In Python 3.13’s new REPL, typing >>> produces:
A. ZeroDivisionError: division by zero
B. ∞ (Unicode infinity)
C. 1e+inf
D. A warning only; result is nan
Answer: A – Python 3.x still raises ZeroDivisionError; PEP 730 (2025) kept
semantics for pedagogical clarity.
2. Code-Analysis Q
3. PythonCopy
x=7
if x%2:
print("odd")
else:
4. print("even")
Output = ?
A. odd
B. even
C. SyntaxError
D. NameError
Answer: A – x%2 is 1 (truthy).
... (continue 23 more)
B. Data Structures Intro (20 Q)
, 26. Debugging Q
PythonCopy
nums=[1,2,3]
nums.append[4]
Error & fix:
A. AttributeError → use append(4)
B. SyntaxError → use append(4)
C. TypeError → use append(4)
D. IndexError → use insert(4)
Answer: C – append is method, not subscript; requires parentheses.
... (continue 19 more)
C. Computational Thinking (20 Q)
45. Problem-Decomposition Q
Which step BEST exempliates decomposition?
A. Writing one 50-line main()
B. Splitting program into input/process/output functions
C. Using global constants
D. Replacing recursion with loop
Answer: B – breaking into smaller tasks.
... (continue to Q65)
OBJECTIVE ASSESSMENT – INTERMEDIATE APPLICATION (65 Q)