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

WGU E010 Foundations of Programming (Python) 2026 Updated OA Practice Questions PDF – 100 Advanced Practice Questions with Answers & Detailed Rationales

Document preview thumbnail
Preview 4 out of 48 pages

INSTANT PDF DOWNLOAD - Prepare for the WGU E010 Foundations of Programming (Python) Objective Assessment with 100 advanced practice questions covering Python syntax, data types, variables, operators, control flow, loops, functions, modules, file handling, exception handling, object-oriented programming, data structures, algorithms, and debugging. This 2026 updated edition includes exam-style questions with correct answers and detailed rationales to reinforce understanding and boost exam readiness. Ideal for WGU students, programming beginners, and candidates preparing for the E010 OA. Download instantly and study on any device. Independent study material; not affiliated with or endorsed by Western Governors University or any official academic, licensing, or certifying authority.

Content preview

WGU E010 Foundations of Programming (Python) – 2026 Updated OA Practice
Questions
100 Advanced Practice Questions with Answers & Detailed Rationales


Section 1: Variables, Data Types & Type Conversion (Questions 1–25)


1. Which of the following is a valid variable name in Python?
A) 2ndPlace
B) my-variable
C) my_variable
D) class
Answer C: — my_variable
Rationale: Python variable names cannot start with a digit (eliminating
2ndPlace), cannot contain hyphens (eliminating my-variable), and cannot be
reserved keywords like `class` (eliminating class). Underscores are allowed and
commonly used, so `my_variable` is valid. ---

,2. What is the output of the following code? ```python x = 5 y = 10 print(x +
y) ```
A) 510
B) 15
C) 15
D) 5 10
Answer B: — 15
Rationale: The `+` operator performs arithmetic addition when both operands
are integers. The values 5 and 10 are added to produce 15. If the operands
were strings, `+` would concatenate them, but here they are integers, so
numeric addition occurs. ---




3. What is the output of the following code? ```python print(type()) ```
A) `<class 'int'>`
B) `<class 'float'>`
C) `<class 'double'>`
D) `<class 'str'>`
Answer B: — `<class 'float'>`
Rationale: In Python, the division operator `/` always returns a float, even if
the numbers divide evenly. Therefore, `` evaluates to `5.0`, and
`type(5.0)` returns `float`. Python does not have a separate `double` type. ---

,4. Which data type is immutable in Python?
A) list
B) dict
C) set
D) tuple
Answer D: — tuple
Rationale: A tuple cannot be changed after creation (immutable). Lists,
dictionaries, and sets are mutable and can be modified after creation. ---




5. What will the following code print? ```python x = "Hello" print(x[1]) ```
A) H
B) e
C) l
D) o
Answer B: — e
Rationale: String indexing starts at 0 in Python. `x[0] = 'H'`, `x[1] = 'e'`, so the
output is `'e'`. ---




6. What is the output of the following code? ```python print(2 3) ```

, A) 6
B) 8
C) 9
D) 5
Answer B: — 8
Rationale: The `` operator is the exponentiation operator. `2 3` means 2
raised to the power of 3, which equals 8. ---




7. What is the output of the following code? ```python x = "5" y = 2 print(x y)
```
A) 10
B) Error
C) "55"
D) 5
Answer C: — "55"
Rationale: When a string is multiplied by an integer, Python repeats
(concatenates) the string that many times. The string `"5"` is repeated 2 times,
resulting in `"55"`. This is known as string replication. ---




8. What is the output of `print(10 // 3)`?
A) 3.33

Document information

Uploaded on
September 16, 2026
Number of pages
48
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$25.49

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.
Stuviahero01
3.8
(42)
Sold
232
Followers
11
Items
5946
Last sold
23 hours 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