WGU D522 CORE CONCEPTS FOR PYTHON IT
AUTOMATION 2026 EXAM COMPLETE (302)
CURRENT TESTING QUESTIONS AND
DETAILED CORRECT
ANSWERS|GUARANTEED PASS.
PYTHON IT
Ace your WGU D522 Core Concepts for Python IT Automation
exam by mastering scripting for system administration, file
handling, regex, and API interactions. This study guide evaluates
your ability to write efficient, reusable Python code for
automating routine IT tasks through realistic, scenario-based
practice questions. It is specifically designed to ensure your
success on the objective assessment and prepare you for real-
world automation challenges.
Python uses indentation (spaces or tabs at the start of a line)
to define code blocks instead of braces. Consistent
indentation is required for structures like if statements,
loops, and function definitions. ✓ ✓ ...... ANSWER .......
Indentation in Python
, Page 2 of 55
A variable is a named reference to a value in memory. You
create one by simply assigning a value to a name using =. ✓
✓ ...... ANSWER ....... Variable in Python
Important built-in data types include Integer (int), Floating-
point (float), String (str), Boolean (bool), and NoneType. ✓ ✓
...... ANSWER ....... Basic data types in Python
Whole numbers (e.g. 42, -5). ✓ ✓ ...... ANSWER .......
Integer in Python
Decimal numbers (e.g. 3.14, 0.5). ✓ ✓ ...... ANSWER .......
Floating-point in Python
Text sequences in quotes (e.g. 'Hello'). ✓ ✓ ...... ANSWER
....... String in Python
Truth values True or False. ✓ ✓ ...... ANSWER .......
Boolean in Python
, Page 3 of 55
The special value None indicating 'no value.' ✓ ✓ ......
ANSWER ....... NoneType in Python
You can use the type() function to check an object's type. For
example, type(42) returns <class 'int'>. ✓ ✓ ...... ANSWER
....... Type checking in Python
Use Python's built-in conversion functions like int(), float(),
str(), and bool(). ✓ ✓ ...... ANSWER ....... Type
conversion in Python
Converts a string to an integer. For example, int('123')
converts '123' to 123. ✓ ✓ ...... ANSWER ....... int()
function
Converts a number to a string. For example, str(123)
converts 123 to '123'. ✓ ✓ ...... ANSWER ....... str()
function
Operators are symbols that perform operations on values,
including arithmetic and comparison operators. ✓ ✓ ......
ANSWER ....... Operators in Python
, Page 4 of 55
Include + (addition), - (subtraction), * (multiplication), /
(division), // (floor division), % (modulus), and **
(exponentiation). ✓ ✓ ...... ANSWER ....... Arithmetic
operators in Python
Include == (equal to), != (not equal), <, <=, >, >=. ✓ ✓ ......
ANSWER ....... Comparison operators in Python
Using = instead of == in a condition, which causes a syntax
error. ✓ ✓ ...... ANSWER ....... Common pitfall in
Python
The // operator is the floor division operator. ✓ ✓ ......
ANSWER ....... // operator in Python
Involves opening a file and counting lines. ✓ ✓ ......
ANSWER ....... Reading from files in Python
Can be accessed using the help() function. ✓ ✓ ......
ANSWER ....... Python's built-in documentation