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 4 out of 84 pages
Exam (elaborations)

WGU D522 (WEN1) Task 1 Performance Assessment | Incident Response & DNS Remediation | Python, GitLab, Device Inventory, Email, Helpdesk API & Evidence Guide | 2026 Updated

Document preview thumbnail
Preview 4 out of 84 pages

WGU D522 (WEN1) Task 1 Performance Assessment | Incident Response & DNS Remediation | Python, GitLab, Device Inventory, Email, Helpdesk API & Evidence Guide | 2026 Updated

Content preview

WGU D522 (WEN1) Task 1 Performance Assessment |
Incident Response & DNS Remediation | Python,
GitLab, Device Inventory, Email, Helpdesk API &
Evidence Guide | 2026 Updated

SECTION 1: PYTHON FUNDAMENTALS FOR IT AUTOMATION
(Questions 1–50)

1. Which data type would be most appropriate for storing a collection
of unique IP addresses in Python?

A. List
B. Tuple
C. Set
D. Dictionary

Correct Answer: C

Rationale: A set is the most appropriate data type for storing
unique IP addresses because sets automatically eliminate duplicate
values. Lists and tuples allow duplicates, and while dictionaries can
store unique keys, a set is the most direct and efficient choice for a
collection of unique values without associated data .



2. What is the output of the following code? name = "IT Automation"
print(name[3:8])

A. "Auto"
B. "Autom"
C. "o Aut"
D. "Automat"

Correct Answer: C

,Rationale: String slicing in Python uses the syntax [start:stop],
where the start index is inclusive and the stop index is exclusive.
name[3:8] starts at index 3 ("o") and stops before index 8 ("t"),
resulting in "o Aut" (indices 3,4,5,6,7: o, space, A, u, t) .



3. Which operator is used for exponentiation in Python?

A. ^
B. **
C. //
D. *

Correct Answer: B

Rationale: ** is the exponentiation operator (e.g., 2**3 = 8). ^ is
bitwise XOR, not exponentiation. // is floor division .



4. What is the output of print(3 * "Hi") in Python?

A. HiHiHi
B. 3Hi
C. Hi
D. TypeError

Correct Answer: A

Rationale: The * operator repeats a string when used with an
integer. "Hi" * 3 results in "HiHiHi" .



5. What data type is produced by the input("Enter age: ") function in
Python?

,A. int
B. float
C. str
D. bool

Correct Answer: C

Rationale: The input() function always returns a string, regardless
of what the user types. Use int() or float() to convert the input to a
numeric type .



6. Which of the following statements will cause a NameError in
Python?

A. print(x) where x = 5 defined earlier
B. print(y) where y has not been defined
C. print("hello")
D. print(5)

Correct Answer: B

Rationale: A NameError occurs when a variable name is used but
has not been defined. Common causes include typos in variable names
.



7. Which escape sequence represents a tab character in Python?

A. \t
B. \n
C. \r
D. \b

Correct Answer: A

, Rationale: \t is the escape sequence for a tab character. \n is
newline, \r is carriage return, \b is backspace .



8. Which data structure is being used to store the device names in the
following code? devices = ["router01", "switch01", "modem01",
"gateway01", "printer01"]

A. Tuple
B. Dictionary
C. List
D. Set

Correct Answer: C

Rationale: Square brackets [] denote a list in Python. Lists are
ordered, mutable collections that allow duplicate values .



9. What does the slice operation my_list[1:4] return?

A. Elements at indices 1, 2, 3, and 4
B. Elements at indices 1, 2, and 3 (4 is exclusive)
C. Elements at indices 1 and 4 only
D. Elements from index 1 to the end of the list

Correct Answer: B

Rationale: In Python slicing, the stop index is exclusive, meaning
the element at that index is not included. So [1:4] includes elements at
indices 1, 2, and 3. This "off-by-one" behavior is a common source of
errors in automation scripts .

Document information

Uploaded on
September 15, 2026
Number of pages
84
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$17.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
0
Followers
0
Items
84
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed 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