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

WGU D522 Python IT Automation Objective Assessment 2026/2027 – Practice Questions, Answers & Detailed Rationales Guranteed pass (GRADED A+)

Document preview thumbnail
Preview 4 out of 89 pages

Prepare for the WGU D522 Python IT Automation Objective Assessment 2026/2027 with a comprehensive collection of practice questions, correct answers, and detailed rationales covering key Python and IT automation concepts. The material is designed to reinforce topics such as Python programming, automation workflows, scripting, data handling, debugging, and practical IT tasks. Use this resource for focused review, self-assessment, and exam preparation.

Content preview

WGU D522 Python IT Automation
Objective Assessment 2026/2027 –
Practice Questions, Answers & Detailed
Rationales Guranteed pass (GRADED A+)
Question 1

Which Python data type is mutable?

A. Tuple
B. String
C. List
D. Integer

Answer: _C. List_

Rationale: Lists are mutable, meaning their elements can be changed
after the list is created. Strings, tuples, and integers are immutable.



Question 2
Which Python statement is used to handle an exception?

A. if/else
B. try/except
C. for/while
D. def/return

Answer: _B. try/except_

,Rationale: The try block contains code that may generate an
exception, while except defines how the program should respond
when that exception occurs.



Question 3

Which module is commonly used to work with operating-system
functionality such as environment variables and directory operations?

A. os
B. math
C. random
D. statistics

Answer: _A. os_

Rationale: Python's os module provides an interface to operating-
system features, including paths, directories, environment variables, and
process-related operations.



Question 4

What does the following expression return?

len("Python")

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

Answer: _B. 6_

,Rationale: The string "Python" contains six characters: P, y, t, h, o,
and n.



Question 5

Which method adds one item to the end of a Python list?

A. insert()
B. extend()
C. append()
D. add()

Answer: _C. append()_

Rationale: append() adds a single element to the end of a list.
extend() adds elements from an iterable.



Question 6

Which file mode opens an existing file for reading?

A. w
B. a
C. r
D. x

Answer: _C. r_

Rationale: The r mode opens a file for reading. The w mode writes and
can overwrite existing content, while a appends.

, Question 7

What is the primary purpose of a Python function?

A. To permanently store data
B. To group reusable code
C. To automatically install packages
D. To replace variables

Answer: _B. To group reusable code_

Rationale: Functions organize instructions into reusable blocks that can
accept inputs and optionally return results.



Question 8

Which keyword is used to define a function in Python?

A. function
B. define
C. func
D. def

Answer: _D. def_

Rationale: Python uses the def keyword followed by the function name
and parameter list to define a function.



Question 9

Which Python library is commonly used to make HTTP requests?

Document information

Uploaded on
September 29, 2026
Number of pages
89
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

Sold
10
Followers
0
Items
840
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