• 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 66 pages
Exam (elaborations)

WGU E010 Foundations of Programming (Python) | Comprehensive OA Practice Workbook | Questions, Coding Exercises, Answers & Explanations | 2026/2027 Updated

Document preview thumbnail
Preview 4 out of 66 pages

WGU E010 Foundations of Programming (Python) | Comprehensive OA Practice Workbook | Questions, Coding Exercises, Answers & Explanations | 2026/2027 Updated

Content preview

,WGU E010 Foundations of Programming
(Python) Practice Workbook
Section 1: Python Basics, Variables & Data
Types (Questions 1–12)
1. What is the output of the following Python
expression?
Python
print(10 // 3)
• A. 3.3333

• B. 3

• C. 4

• D. 3.0


Correct Answer: B
Rationale: The floor division operator (//) divides two
numbers and rounds down to the nearest integer,
discarding any fractional remainder.
2. Which of the following variable names is
illegal and will raise a SyntaxError in Python?
• A. total_score
• B. 2nd_place
• C. _user_name
• D. itemCount
Correct Answer: B

,Rationale: Variable names in Python cannot start
with a digit (2nd_place). They must begin with a
letter or an underscore.
3. What data type is returned by the expression
type() in Python 3?
• A. <class 'int'>
• B. <class 'str'>
• C. <class 'float'>
• D. <class 'double'>
Correct Answer: C
Rationale: In Python 3, standard division (/) always
returns a floating-point number, even if both
operands are integers and divide evenly.
4. What is the output of the following string
operation?
Python
word = "Python"
print(word[1:4])
• A. Pyt

• B. yth

• C. ytho

• D. ytho


Correct Answer: B

, Rationale: String slicing [start:stop] includes the
start index (1 → 'y') up to, but not including, the stop
index (4 → 'o'). Thus, indices 1, 2, and 3 yield "yth".
5. Which operator is used to calculate the
remainder of division (modulo) in Python?
• A. /
• B. //
• C. %
• D. **
Correct Answer: C
Rationale: The modulo operator (%) computes the
remainder of a division operation (e.g., 7 % 3 = 1).
6. What is the result of evaluating the boolean
expression True and False or True?
• A. True
• B. False
• C. None
• D. TypeError
Correct Answer: A
Rationale: Operator precedence evaluates and
before or. True and False evaluates to False. Then
False or True evaluates to True.

Document information

Uploaded on
October 28, 2026
Number of pages
66
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.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

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
36
Followers
3
Items
3063
Last sold
1 week 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