• 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 3 out of 19 pages
Exam (elaborations)

WGU D522 Python for IT Automation Objective Assessment 2026/2027 – Questions and Answers | 100% Verified | Complete Verified Answers – Pass Guaranteed – A+ Graded

Document preview thumbnail
Preview 3 out of 19 pages

WGU D522 Python for IT Automation Objective Assessment 2026/2027 – Questions with Answers | 100% Correct | Python Scripting, IT Automation | Graded A+ Verified | Task Automation, Scripting Fundamentals | Detailed Rationales | Verified Correct Answers – Pass Guaranteed – Instant Download

Content preview

A+ VERIFIED

IT AUTOMATION · OBJECTIVE ASSESSMENT


WGU D522 Objective Assessment (New 2026/2027 Update)
Python for IT Automation | Qs & As | Grade A | 100% Correct
(Verified Answers) — 2026/2027 — Complete
Official Exam

50 Questions Full Rationales Verified Answers




50 5 100%
QUESTIONS SECTIONS RATIONALES



WHAT THIS COVERS

01 PYTHON SYNTAX, TYPES & OPERATORS



02 DATA STRUCTURES & CONTROL FLOW



03 FUNCTIONS, MODULES & ERROR HANDLING



04 FILES, PROCESSES & OS AUTOMATION



05 SCRIPTING WORKFLOWS, APIS & SCHEDULED TASKS



ABOUT THIS ASSESSMENT
This assessment is an original study resource prepared for focused exam review. Every question, answer
option, and rationale was authored specifically for this 2026/2027 edition and mapped to high-yield topics from
the published Python for IT Automation curriculum outline. Work through all five sections, read each rationale
closely, and spend your remaining study time on the concepts you miss. Answer every item before opening the
key for the most accurate picture of your readiness.




PASSING SCORE LEVEL FORMAT

70% Undergraduate — Information Technology Multiple Choice (PDF)


STUVIA ACTUAL EXAM Page 1

,SECTION 01 PYTHON SYNTAX, TYPES & OPERATORS


Q1. A help-desk script evaluates print(17 // 5, 17 % 5) to split incoming tickets evenly across five queues.
What does the interpreter display?

A. 3.4 2, since floor division returns a float.
B. 3 3.4, since modulo converts its result to a float.
C. 4 2, since floor division rounds to the nearest integer.
D. 3 2, since floor division discards the remainder and modulo keeps it.

Correct Answer: D
Rationale: The // operator floors the quotient of 17 and 5 to 3, while % returns the remainder 2. Both operators return integers
when both operands are integers.


Q2. A junior developer tries to correct a report header with the statement header[0] = 'J' after assigning
header = 'status', and the program stops immediately. What causes the failure?

A. Strings are immutable, so individual characters cannot be reassigned.
B. The index 0 is outside the range of any string.
C. Assignment to variables requires the global keyword.
D. The letter J is not a valid string character.

Correct Answer: A
Rationale: String objects cannot be modified after creation, so item assignment raises a TypeError. Producing a corrected
header requires building a new string, for example with slicing or concatenation.


Q3. A validation routine receives values from a form and must accept any integer, including booleans that
arrive from checkboxes. A reviewer asks what isinstance(True, int) returns and why it matters. What is the
correct answer?

A. False, because booleans are a completely separate type family.
B. True, because isinstance converts booleans to integers first.
C. It raises an error, since isinstance refuses boolean arguments.
D. True, because bool is a subclass of int in the Python type system.

Correct Answer: D
Rationale: In Python, bool inherits from int, so True and False are instances of int and behave as 1 and 0 in arithmetic. Code
that must exclude booleans needs an explicit extra check.




STUVIA ACTUAL EXAM Page 2

, Q4. An invoice script formats a total with the f-string f'{total:.2f}' where total = 7. What exact string is
produced?

A. 7, because the trailing zeros are trimmed by default.
B. 7.00, because the format spec forces two decimal places.
C. 7.0, because one decimal place is the f-string default.
D. 7.2, because the spec digits become literal text.

Correct Answer: B
Rationale: The .2f specification formats the number as a fixed-point value with exactly two digits after the decimal point.
Integers are therefore rendered with two padded zeros.


Q5. A config loader contains the line value = loaded or 'default.yaml' and loaded sometimes arrives as an
empty list. What does the expression evaluate to in that case?

A. An empty list, because or always returns its first operand.
B. None, because or converts empty containers to None.
C. default.yaml, because an empty list is falsy and or returns the second operand.
D. default.yaml, because or compares memory addresses.

Correct Answer: C
Rationale: The or operator short-circuits: if the first operand is falsy, it evaluates and returns the second. Empty containers,
zero, and empty strings are all falsy in Python.


Q6. A reviewer examines the statements a = [1, 2] and b = [1, 2] and then asks about the results of a == b
and a is b. What should the reviewer expect?

A. True and False, because equality compares contents while is compares identity.
B. True and True, because equal objects are always the same object.
C. False and True, because identity implies different contents.
D. False and False, because separate literals never compare equal.

Correct Answer: A
Rationale: The == operator tests value equality between the two lists' elements. The is operator tests object identity, and two
separately constructed lists occupy different memory locations.




STUVIA ACTUAL EXAM Page 3

Document information

Uploaded on
October 3, 2026
Number of pages
19
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.
STUVIAACTUALEXAMS
3.5
(176)
Sold
1342
Followers
209
Items
10272
Last sold
1 hour 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