WGU E010 Foundations of Programming (Python)
2026 Practice Assessment
1. Which symbol begins a single-line comment in Python?
A. //
B. #
C. *
D. %
Answer: B. #
Rationale: Python uses # for single-line comments.
2. What data type is 3.14?
A. Integer
B. Float
C. String
D. Boolean
Answer: B. Float
Rationale: Numbers with decimals are floats.
3. What follows the in keyword in a for loop?
A. Condition
B. Iterable
C. Number
D. Function
Answer: B. Iterable
Rationale: Loops iterate over lists, strings, etc.
4. Which loop is used when the number of iterations is known?
A. while
B. for
C. infinite
D. do-while
Answer: B. for
Rationale: for loops iterate a fixed number of times.
1|Page
,5. A while loop requires:
A. Variable only
B. Condition + indented block
C. Break statement
D. List
Answer: B. Condition + indented block
Rationale: Loop runs while condition is True.
6. Which keyword exits a loop early?
A. stop
B. break
C. return
D. exit
Answer: B. break
Rationale: break terminates loop immediately.
7. In for item in list, item is:
A. Index
B. Value
C. Length
D. List
Answer: B. Value
Rationale: Iterates over elements.
8. Which structure prevents duplicates?
A. List
B. Tuple
C. Dictionary
D. Set
Answer: D. Set
Rationale: Sets store unique values only.
9. Which is immutable?
A. List
B. Dict
2|Page
, C. Tuple
D. Set
Answer: C. Tuple
Rationale: Tuples cannot be changed.
10. To run Python code from a file:
A. Compile
B. Upload
C. Save + interpreter
D. Convert
Answer: C
Rationale: Python uses an interpreter.
11. Advantage of integrated terminal:
A. Faster
B. More libraries
C. No switching apps
D. Debugging
Answer: C
Rationale: Improves workflow.
12. Navigate directory command:
A. move
B. cd
C. goto
D. nav
Answer: B
Rationale: cd = change directory.
13. Interactive Python tool:
A. Editor
B. Shell
C. Browser
D. Debugger
3|Page
2026 Practice Assessment
1. Which symbol begins a single-line comment in Python?
A. //
B. #
C. *
D. %
Answer: B. #
Rationale: Python uses # for single-line comments.
2. What data type is 3.14?
A. Integer
B. Float
C. String
D. Boolean
Answer: B. Float
Rationale: Numbers with decimals are floats.
3. What follows the in keyword in a for loop?
A. Condition
B. Iterable
C. Number
D. Function
Answer: B. Iterable
Rationale: Loops iterate over lists, strings, etc.
4. Which loop is used when the number of iterations is known?
A. while
B. for
C. infinite
D. do-while
Answer: B. for
Rationale: for loops iterate a fixed number of times.
1|Page
,5. A while loop requires:
A. Variable only
B. Condition + indented block
C. Break statement
D. List
Answer: B. Condition + indented block
Rationale: Loop runs while condition is True.
6. Which keyword exits a loop early?
A. stop
B. break
C. return
D. exit
Answer: B. break
Rationale: break terminates loop immediately.
7. In for item in list, item is:
A. Index
B. Value
C. Length
D. List
Answer: B. Value
Rationale: Iterates over elements.
8. Which structure prevents duplicates?
A. List
B. Tuple
C. Dictionary
D. Set
Answer: D. Set
Rationale: Sets store unique values only.
9. Which is immutable?
A. List
B. Dict
2|Page
, C. Tuple
D. Set
Answer: C. Tuple
Rationale: Tuples cannot be changed.
10. To run Python code from a file:
A. Compile
B. Upload
C. Save + interpreter
D. Convert
Answer: C
Rationale: Python uses an interpreter.
11. Advantage of integrated terminal:
A. Faster
B. More libraries
C. No switching apps
D. Debugging
Answer: C
Rationale: Improves workflow.
12. Navigate directory command:
A. move
B. cd
C. goto
D. nav
Answer: B
Rationale: cd = change directory.
13. Interactive Python tool:
A. Editor
B. Shell
C. Browser
D. Debugger
3|Page