• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 73 pages
Exam (elaborations)

Academic Year 2026–2027 WGU E010 Objective Assessment Study Guide: 190+ Exam Questions with Verified Answers and Detailed Rationales – Latest Edition Review of Python Programming Constructs, Data Structures, Code Execution, and Functional Programs

Document preview thumbnail
Preview 4 out of 73 pages

Prepare confidently for the WGU E010 Objective Assessment for the 2026–2027 academic year with this comprehensive study guide designed for Western Governors University students in the Foundations of Programming course. This essential test bank features 190+ exam-style questions with verified answers and detailed rationales, thoroughly covering the four core competencies tested on the assessment: identifying Python programming constructs including syntax, operators, and development environments; executing Python code including tracing expressions, loops, strings, and function results; manipulating data structures including lists, tuples, sets, and dictionaries; and creating functional programs including functions, conditionals, loops, debugging, and return values. Whether you are preparing for your first attempt or seeking remediation after an unsuccessful assessment, this resource helps reinforce Python fundamentals, sharpen code-tracing and problem-solving skills, and build the confidence needed to pass the E010 Objective Assessment. Master the essential competencies required for success in Python programming and secure your copy today to excel in your WGU coursework.

Content preview

Question 1: What is the primary purpose of a variable in a Python program?

A. To permanently store data on the hard drive
B. To serve as a named reference to a value stored in memory
C. To define the syntax rules of the language
D. To compile Python code into machine language

CORRECT ANSWER: B. To serve as a named reference to a value stored in memory

Rationale: A variable in Python is a named reference that points to an object stored in
memory. It allows a programmer to store, retrieve, and manipulate data throughout a
program. Variables do not permanently store data on disk (that is file I/O) and are not
involved in language syntax definition or compilation.



Question 2: Which of the following is a valid Python variable name?

A. 2nd_place
B. total-score
C. _user_name
D. class

CORRECT ANSWER: C. _user_name

Rationale: Python variable names must begin with a letter or an underscore, may
contain letters, digits, and underscores, and cannot be a reserved keyword.
"2nd_place" begins with a digit, "total-score" contains a hyphen, and "class" is a
reserved keyword.



Question 3: What data type does the expression type() return in Python 3?

A. int
B. float
C. str
D. bool

CORRECT ANSWER: B. float

Rationale: In Python 3, the single forward slash / performs true division and always
returns a float, even when the result is a whole number. evaluates to 5.0, so type()
returns float. The // operator would return an integer.



Question 4: Which of the following is an immutable data type in Python?

,A. list
B. dictionary
C. set
D. tuple

CORRECT ANSWER: D. tuple

Rationale: A tuple is immutable, meaning its contents cannot be changed after
creation. Lists, dictionaries, and sets are mutable and can be modified after they are
created. Immutability means no item assignment, appending, or removal is permitted.



Question 5: What is the result of the expression 7 // 2?

A. 3.5
B. 3
C. 4
D. 1

CORRECT ANSWER: B. 3

Rationale: The // operator performs floor division, which divides and then rounds down
to the nearest whole number. 7 // 2 equals 3.5, which floors to 3. The % operator would
return the remainder 1.



Question 6: What is the result of the expression 2 ** 3?

A. 6
B. 8
C. 9
D. 5

CORRECT ANSWER: B. 8

Rationale: The ** operator performs exponentiation. 2 ** 3 means 2 raised to the power
of 3, which equals 8. The * operator would give 6, and + would give 5.



Question 7: Which operator is used to check equality in Python?

A. =
B. ==
C. !=
D. <=

,CORRECT ANSWER: B. ==

Rationale: The == operator compares two values for equality and returns a Boolean. The
single = is the assignment operator. The != operator checks inequality, and <= checks
less-than-or-equal-to.



Question 8: What is the output of the following code? x = 5; y = 2; print(x % y)

A. 2.5
B. 2
C. 1
D. 0

CORRECT ANSWER: C. 1

Rationale: The % operator returns the remainder of integer division. 5 divided by 2
equals 2 with a remainder of 1, so print(x % y) outputs 1. The // operator would return 2.



Question 9: Which of the following correctly creates a string in Python?

A. name = 'Alice'
B. name = Alice
C. name = @Alice@
D. name = [Alice]

CORRECT ANSWER: A. name = 'Alice'

Rationale: Strings in Python are created by enclosing characters in single quotes,
double quotes, or triple quotes. Option B would attempt to reference an undefined
variable, Option C uses invalid symbols, and Option D creates a list.



Question 10: What is the result of len("Python")?

A. 5
B. 6
C. 7
D. Error

CORRECT ANSWER: B. 6

Rationale: The len() function returns the number of characters in a string, including
spaces. "Python" has six characters: P, y, t, h, o, n. Indexing is zero-based, but len()
returns the total count.

, Question 11: What does the following code output? print("Hello" + "World")

A. Hello World
B. HelloWorld
C. Hello+World
D. Error

CORRECT ANSWER: B. HelloWorld

Rationale: The + operator concatenates strings without adding a space. To include a
space, the programmer must explicitly include it, as in "Hello " + "World". The output is
HelloWorld.



Question 12: What is the output of print("ab" * 3)?

A. ababab
B. ab3
C. ab ab ab
D. Error

CORRECT ANSWER: A. ababab

Rationale: The * operator repeats a string the specified number of times. "ab" * 3
produces "ababab". No spaces are inserted between repetitions.



Question 13: What is the correct way to convert the string "42" to an integer?

A. int("42")
B. str(42)
C. float("42")
D. integer("42")

CORRECT ANSWER: A. int("42")

Rationale: The int() function converts a string or float to an integer. str() converts to a
string, float() converts to a float, and integer() is not a built-in Python function.



Question 14: Which of the following is the correct syntax for an if statement in
Python?

A. if x > 5 { print("yes") }
B. if x > 5: print("yes")

Document information

Uploaded on
September 30, 2026
Number of pages
73
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
261
Followers
1
Items
356
Last sold
6 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions