BUNDLE | MASTER STUDY GUIDE + TASK 1 & TASK 2
PERFORMANCE ASSESSMENT GUIDES + PYTHON CODE
COMPANION | 2026 UPDATED
This comprehensive master study guide and practice examination is meticulously designed for
candidates preparing for the Western Governors University (WGU) D522 V2 Python for IT
Automation Objective Assessment (OA) and Performance Assessment (PA). Aligned with the
2026/2027 curriculum, this document serves as a definitive study guide and exam review,
featuring 100 super-advanced questions that mirror the complexity and rigor of the actual
certification examination. It covers both theoretical foundations and practical workplace
applications, including Python fundamentals, data structures, control flow, functions, file
handling, exception handling, modular programming, API integration, network automation,
logging, GitLab workflows, and the complete Task 1 and Task 2 Performance Assessment
roadmaps. Each question is accompanied by a detailed, verified solution to ensure 100% correct
answers and a deep, integrated understanding of Python for IT Automation principles,
guaranteeing distinction-level preparation for this critical IT credential.
Table of Contents
1. Course Overview: D522 V2 – Python for IT Automation
2. Python Fundamentals: Syntax, Variables, and Data Types
3. Control Flow: Conditionals and Loops
4. Data Structures: Lists, Tuples, Dictionaries, and Sets
5. Functions and Modular Programming
6. File Handling and I/O Operations
7. Exception Handling and Debugging
8. Automation Techniques: Scripting, Scheduling, and APIs
9. Network Automation: DNS, Monitoring, and Remediation
10. Logging, Error Handling, and Notification Systems
11. GitLab Integration and CI/CD Pipelines
12. Task 1 Performance Assessment Roadmap
13. Task 2 Performance Assessment Roadmap
14. Python Code Companion: Essential Snippets and Patterns
15. Objective Assessment (OA) and Pre-Assessment (PA) Strategies
,Question 1
In the WGU D522 V2 course, which of the following best describes the primary focus of the
curriculum?
A) Web development using Django and Flask frameworks
B) The fundamentals of the Python language and its features to control program flow, inform
decisions, and automate IT tasks and processes
C) Data science and machine learning with Python libraries
D) Game development using Pygame
Correct Answer: B
The D522 V2 course covers the fundamentals of the Python language and its features to control
program flow, inform decisions, and automate IT tasks and processes. The course emphasizes a
systematic approach to solving problems and the application of programming logic to administer
secure IT environments.
Question 2
Which programming paradigm focuses on describing a sequence of steps to perform a task?
A) Object-Oriented Programming
B) Functional Programming
C) Imperative/Procedural Programming
D) Declarative Programming
Correct Answer: C
Imperative/procedural programming focuses on describing a sequence of steps to perform a
task. This paradigm is fundamental to Python scripting and IT automation, where tasks are
broken down into step-by-step instructions.
Question 3
Which of the following is a trait of imperative/procedural programming?
A) It uses classes and objects to encapsulate data
B) It emphasizes the use of pure functions without side effects
,C) It relies on statements that change a program's state through assignment and control flow
D) It focuses on what to compute rather than how to compute it
Correct Answer: C
Imperative/procedural programming relies on statements that change a program's state through
assignment and control flow. This approach is characterized by sequential execution, loops, and
conditional statements that modify variables and program state.
Question 4
Which data type in Python is immutable?
A) List
B) Dictionary
C) Tuple
D) Set
Correct Answer: C
Tuples are immutable in Python, meaning they cannot be modified after creation. Lists,
dictionaries, and sets are all mutable data types that can be changed after creation.
Question 5
Which of the following is a mutable data type in Python?
A) Tuple
B) String
C) Integer
D) List
Correct Answer: D
Lists are mutable data types in Python, allowing elements to be added, removed, or modified
after creation. Tuples, strings, and integers are immutable data types.
, Question 6
What is the correct way to prompt a user for an integer value and store it in a variable for later
calculation?
A) age = input("Enter your age: ")
B) age = int(input("Enter your age: "))
C) age = input("Enter your age: ").to_int()
D) age = Integer(input("Enter your age: "))
Correct Answer: B
The correct approach to read and store an integer is age = int(input("Enter your age: ")).
The input() function returns a string, which must be explicitly converted to an integer using
the int() function.
Question 7
What is the primary advantage of using dictionaries in Python?
A) They store values in order
B) They allow fast numerical indexing
C) They provide fast key-based lookups and are mutable
D) They are immutable and hashable
Correct Answer: C
Dictionaries provide fast key-based lookups and are mutable. Unlike lists, which use numerical
indices, dictionaries use keys to access values, making them ideal for storing and retrieving data
by identifier.
Question 8
Which of the following is a correct way to create an empty dictionary in Python?
A) {}
B) []
C) ()
D) set()