WGU D522 Core Concepts for python IT Automation (SKO1)
EXAM AND PRACTICE EXAM NEWEST ACTUAL EXAM
COMPLETE QUESTIONS AND CORRECT DETAILED ANSWERS
(VERIFIED ANSWERS) |ALREADY GRADED A+\WGU D522
python for It Automation
Indentation in Python
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.
Variable in Python
A variable is a named reference to a value in memory. You create one by
simply assigning a value to a name using =.
Dynamic typing in Python
Python is dynamically typed, meaning you don't declare types explicitly.
Reassigning variables in Python
A variable can refer to data of any type and can be reassigned to a
different type later.
1/49
,4/12/26, 9:27 PM Core Concepts for Python IT Automation (WGU D522)
Common advice for D522
Mastering core Python basics, doing all Zybooks labs and quizzes, and
practicing coding exercises.
Fundamental data types and structures in Python
Include strings, lists, tuples, sets, and dictionaries.
Example of improper indentation
An improperly indented line will cause an IndentationError or unexpected
behavior.
Floor Division
It divides two numbers and returns the largest integer less than or equal to
the result.
Example of Floor Division
17 // 5 evaluates to 3 because 17/5 is 3.4 and floor division drops the
fractional part.
Negative Floor Division Example
-5 // 2 gives -3 (since -2.5 floored is -3).
Modulo Operator (%)
The % operator computes the remainder of a division.
2/49
,4/12/26, 9:27 PM Core Concepts for Python IT Automation (WGU D522)
Example of Modulo
7 % 3 equals 1 (since 7 divided by 3 has remainder 1).
Even Divisibility Check
x % 2 == 0 checks if x is even.
Cycling Through Values
Using i % 7 to wrap an index every 7 elements.
Leap Year Determination
year % 4 checks if a year is a leap year.
Modulo with Negative Numbers
Python's result will have the same sign as the divisor.
Logical Operators in Python
Logical operators combine or modify boolean values.
Logical AND
and returns True if both operands are True.
3/49
, 4/12/26, 9:27 PM Core Concepts for Python IT Automation (WGU D522)
Logical OR
or returns True if at least one operand is True.
Logical NOT
not negates a boolean value.
Short-Circuit Evaluation
In (expr1 and expr2), expr2 is only evaluated if expr1 is True.
String Concatenation
Joining strings end-to-end using the + operator.
Example of String Concatenation
"Hello, " + "world!" results in "Hello, world!".
Formatted Strings
You can use f-strings for concatenation and interpolation.
TypeError in Concatenation
Trying to concatenate a string with an integer will raise a TypeError.
4/49