Core Concepts for Python IT Automation ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(WGU D522) exam with correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Indentation in Python - correct answers ✔✔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 - correct answers ✔✔A variable is ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
a named reference to a value in memory. You create
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
one by simply assigning a value to a name using =.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Basic data types in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Important built-in data types include Integer ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(int), Floating-point (float), String (str), Boolean
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(bool), and NoneType. ||\\||\\ ||\\||\\
,Integer in Python - correct answers ✔✔Whole ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
numbers (e.g. 42, -5). ||\\||\\ ||\\||\\ ||\\||\\
Floating-point in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Decimal numbers (e.g. 3.14, 0.5). ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
String in Python - correct answers ✔✔Text
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
sequences in quotes (e.g. 'Hello'). ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Boolean in Python - correct answers ✔✔Truth values ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
True or False. ||\\||\\ ||\\||\\
NoneType in Python - correct answers ✔✔The ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
special value None indicating 'no value.' ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Type checking in Python - correct answers ✔✔You
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
can use the type() function to check an object's type.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
For example, type(42) returns <class 'int'>.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
,Type conversion in Python - correct answers ✔✔Use ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Python's built-in conversion functions like int(), ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
float(), str(), and bool(). ||\\||\\ ||\\||\\ ||\\||\\
int() function - correct answers ✔✔Converts a string
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
to an integer. For example, int('123') converts '123' to
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
123.
||\\||\\
str() function - correct answers ✔✔Converts a
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
number to a string. For example, str(123) converts ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
123 to '123'. ||\\||\\ ||\\||\\
Operators in Python - correct answers ✔✔Operators ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
are symbols that perform operations on values,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
including arithmetic and comparison operators. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, Arithmetic operators in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Include + (addition), - (subtraction), * ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(multiplication), / (division), // (floor division), % ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(modulus), and ** (exponentiation). ||\\||\\ ||\\||\\ ||\\||\\
Comparison operators in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Include == (equal to), != (not equal), <, <=, >, >=. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Common pitfall in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Using = instead of == in a condition, which causes ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
a syntax error.
||\\||\\ ||\\||\\ ||\\||\\
// operator in Python - correct answers ✔✔The //
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
operator is the floor division operator. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Reading from files in Python - correct answers
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Involves opening a file and counting lines. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(WGU D522) exam with correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Indentation in Python - correct answers ✔✔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 - correct answers ✔✔A variable is ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
a named reference to a value in memory. You create
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
one by simply assigning a value to a name using =.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Basic data types in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Important built-in data types include Integer ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(int), Floating-point (float), String (str), Boolean
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(bool), and NoneType. ||\\||\\ ||\\||\\
,Integer in Python - correct answers ✔✔Whole ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
numbers (e.g. 42, -5). ||\\||\\ ||\\||\\ ||\\||\\
Floating-point in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Decimal numbers (e.g. 3.14, 0.5). ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
String in Python - correct answers ✔✔Text
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
sequences in quotes (e.g. 'Hello'). ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Boolean in Python - correct answers ✔✔Truth values ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
True or False. ||\\||\\ ||\\||\\
NoneType in Python - correct answers ✔✔The ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
special value None indicating 'no value.' ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Type checking in Python - correct answers ✔✔You
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
can use the type() function to check an object's type.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
For example, type(42) returns <class 'int'>.
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
,Type conversion in Python - correct answers ✔✔Use ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Python's built-in conversion functions like int(), ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
float(), str(), and bool(). ||\\||\\ ||\\||\\ ||\\||\\
int() function - correct answers ✔✔Converts a string
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
to an integer. For example, int('123') converts '123' to
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
123.
||\\||\\
str() function - correct answers ✔✔Converts a
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
number to a string. For example, str(123) converts ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
123 to '123'. ||\\||\\ ||\\||\\
Operators in Python - correct answers ✔✔Operators ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
are symbols that perform operations on values,
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
including arithmetic and comparison operators. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
, Arithmetic operators in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Include + (addition), - (subtraction), * ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(multiplication), / (division), // (floor division), % ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
(modulus), and ** (exponentiation). ||\\||\\ ||\\||\\ ||\\||\\
Comparison operators in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Include == (equal to), != (not equal), <, <=, >, >=. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Common pitfall in Python - correct answers ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Using = instead of == in a condition, which causes ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
a syntax error.
||\\||\\ ||\\||\\ ||\\||\\
// operator in Python - correct answers ✔✔The //
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
operator is the floor division operator. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
Reading from files in Python - correct answers
||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\
✔✔Involves opening a file and counting lines. ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\ ||\\||\\