Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON) – 2026/2027 COMPREHENSIVE ASSESSMENT

Document preview thumbnail
Preview 3 out of 23 pages

WGU E010 FOUNDATIONS OF PROGRAMMING (PYTHON) – 2026/2027 COMPREHENSIVE ASSESSMENT

Content preview

WGU E010 FOUNDATIONS OF
PROGRAMMING (PYTHON) – 2026/2027
COMPREHENSIVE ASSESSMENT



1. Which of the following describes the behavior of the Python floor division operator (//)

when applied to negative numbers, such as -7 // 2?

A. It results in -4, rounding towards negative infinity.


B. It results in -3, rounding towards zero.


C. It results in -3.5, maintaining the float value.


D. It raises a ValueError due to sign ambiguity.


Answer: A


Conceptual Explanation: In Python, the floor division operator // returns the largest

integer less than or equal to the result. For -3.5, the largest integer less than or equal to it is

-4.


2. What will be the output of the code: x = [1, 2]; y = x; y.append(3); print(x)?

A. [1, 2]


B. [1, 2, 3]


C. [1, 2, [3]]

,D. AttributeError


Answer: B


Conceptual Explanation: Lists are mutable objects. When y = x is assigned, both variables

point to the same memory location. Modifying y also modifies x.


3. In Python, which built-in function is used to obtain the memory address of an object?

A. id()


B. address()


C. loc()


D. ref()


Answer: A


Conceptual Explanation: The id() function returns a unique identifier for an object, which

in CPython corresponds to its memory address.


4. What occurs when a mutable object like a list is used as a default argument in a function

definition?

A. The list is re-initialized to empty every time the function is called.


B. Python raises a SyntaxError.


C. The list becomes immutable within the scope of that function.


D. The same list object is shared across all calls that do not provide an argument.

, Answer: D


Conceptual Explanation: Default arguments are evaluated only once at the time of

function definition, meaning a mutable default will persist and accumulate changes across

calls.


5. Which of the following statements about Python’s ‘is’ operator is correct?

A. It checks if two variables have the same value.


B. It converts both operands to strings before comparison.


C. It is a synonym for the == operator.


D. It checks if two variables point to the same object in memory.


Answer: D


Conceptual Explanation: The ‘is’ operator tests for object identity, whereas ‘==’ tests for

value equality.


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

A. 64


B. 512


C. 32


D. 128


Answer: B

Document information

Uploaded on
August 20, 2026
Number of pages
23
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

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.
TheStar
3.7
(140)
Sold
711
Followers
178
Items
27005
Last sold
2 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