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

WGU D522 (WEN1) Task 1 Performance Assessment Incident Response & DNS Remediation Python, GitLab, Device Inventory QUESTIONS WITH CORRECT ANSWERS 2026

Document preview thumbnail
Preview 4 out of 75 pages

WGU D522 (WEN1) Task 1 Performance Assessment Incident Response & DNS Remediation Python, GitLab, Device Inventory QUESTIONS WITH CORRECT ANSWERS 2026

Content preview

WGU D522 (WEN1) Task 1 Performance Assessment |
Incident Response & DNS Remediation | Python,
GitLab, Device Inventory QUESTIONS WITH CORRECT
ANSWERS 2026

WGU D522 (WEN1) PYTHON FOR IT AUTOMATION

TASK 1 PERFORMANCE ASSESSMENT PREPARATION

Original Practice Questions 1–20

2026 Updated | Answers & Detailed Rationales



QUESTION 1

An IT automation script needs to process information about several network devices. Which
Python data structure is most appropriate for representing each device using named attributes
such as hostname, IP address, and port?

A. Tuple only
B. Dictionary
C. Integer
D. Boolean

Correct Answer: B

Rationale:
A dictionary stores information as key-value pairs, making it appropriate for structured device
information such as hostname, ip_address, and port. A list can contain multiple device
dictionaries, creating a convenient inventory structure.



QUESTION 2

Which Python module is commonly used to read a CSV device inventory?

A. csv
B. random
C. math
D. datetime

,Correct Answer: A

Rationale:
Python's built-in csv module provides tools such as csv.reader() and csv.DictReader() for
processing comma-separated files. DictReader is especially useful when each row contains
named fields.



QUESTION 3

Consider the following code:

device = {

"hostname": "PC01",

"ip": "192.168.1.10"

}



print(device["hostname"])

What is printed?

A. ip
B. PC01
C. hostname
D. 192.168.1.10

Correct Answer: B

Rationale:
The expression device["hostname"] retrieves the value associated with the hostname key. That
value is "PC01".



QUESTION 4

Which Python statement safely retrieves a dictionary value when the key might not exist?

A. device.find("hostname")
B. device.value("hostname")

,C. device.get("hostname")
D. device.search("hostname")

Correct Answer: C

Rationale:
The get() method safely retrieves a dictionary value. If the key does not exist, get() returns None
by default rather than raising a KeyError.



QUESTION 5

An automation script must process every device in a list. Which construct is most appropriate?

A. for loop
B. import statement
C. class declaration only
D. try statement only

Correct Answer: A

Rationale:
A for loop is designed to iterate over collections. It allows the same operation to be performed
against every device in the inventory.



QUESTION 6

Why should an automation script use a connection timeout when testing network devices?

A. To increase network latency
B. To prevent the program from waiting indefinitely for an unavailable device
C. To delete unreachable devices
D. To guarantee every connection succeeds

Correct Answer: B

Rationale:
A timeout limits how long the script waits for a response. This is especially important in
automation because one unreachable device should not cause the entire program to hang
indefinitely.

, QUESTION 7

A device inventory contains ten endpoints. One endpoint is offline. What is the best behavior
for a well-designed automation script?

A. Stop the entire program immediately
B. Skip all remaining devices
C. Record the failed device and continue processing the remaining devices
D. Delete the offline device from the inventory

Correct Answer: C

Rationale:
Automation should be resilient. A connection failure should normally be handled with
appropriate exception handling or status reporting so that the remaining devices can still be
processed.



QUESTION 8

Which Python structure is most appropriate for handling an expected network connection
failure?

A. try/except
B. if/import
C. for/class
D. while/print

Correct Answer: A

Rationale:
try/except allows a program to detect and handle exceptions without terminating unexpectedly.
Network automation commonly requires exception handling for timeouts, connection refusals,
authentication failures, and other communication errors.



QUESTION 9

A Task 1 script needs to connect to devices through Telnet. Which Python library is associated
with Telnet connections in environments where it is available?

A. json
B. telnetlib

Document information

Uploaded on
September 15, 2026
Number of pages
75
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
31
Followers
3
Items
2418
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