Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 24 páginas
Examen

WGU D522 Python for IT Automation OA Actual Exam Prep 2025/2026 | 115+ Verified Questions & Detailed Rationales | Hands-On Coding & Logic Master Guide

Document preview thumbnail
Vista previa 3 fuera de 24 páginas

WGU D522 Python for IT Automation OA Actual Exam Prep 2025/2026 | 115+ Verified Questions & Detailed Rationales | Hands-On Coding & Logic Master Guide

Vista previa del contenido

WGU D522 Python for IT Automation OA
Actual Exam Prep 2025/2026 | 115+
Verified Questions & Detailed Rationales
| Hands-On Coding & Logic Master
Guide

INTRODUCTION

This comprehensive study pack is specifically designed for the WGU D522 Python for IT
Automation course. It contains 100 high-yield practice questions modeled after the actual 2025/2026
exam version, focusing on the critical scripting and system administration skills required by WGU.
What’s Included:
 100 Multiple Choice Questions (MCQs): Covering everything from Data Structures and Regex to System
Modules and OOP.
 Bold-Italicized Answers: For rapid-fire review and instant feedback.
 Grey-Box Rationales: In-depth explanations for every question to help you master the "why" behind the
code.
 Automation Focus: Targeted questions on os , sys , shutil , psutil , and subprocess modules.
Core Competencies Covered:
 Python Fundamentals: Mutable vs. Immutable types, List Comprehensions, and Lambda functions.
 File & Data Handling: Advanced CSV and JSON serialization ( dump vs. dumps ).
 System Automation: Running system commands, monitoring resources, and directory manipulation.
 Regular Expressions: Mastering re.findall , re.search , and shorthand character classes.
 Testing & Logic: Unit testing with unittest , try/except error handling, and logical flow.




Batch 1: Core Syntax, Data Structures, and Control Flow
1. Which of the following data types is immutable in Python?
A) List
B) Dictionary
C) Tuple
D) Set

, Tuples and Strings are immutable, meaning their contents cannot be changed after
creation. Lists, Dictionaries, and Sets are mutable.
2. What is the correct syntax for creating a function in Python?
A) function my_func():
B) def my_func():
C) create my_func():
D) func my_func():
Python uses the def keyword (short for define) to declare a function, followed by the
function name and parentheses.
3. What will be the output of the following code?
my_list = [1, 2, 3]
my_list.append([4, 5])
print(len(my_list))
A) 5
B) 4
C) 3
D) Error
The append() method adds its argument as a single element. The list becomes [1, 2,
3, [4, 5]] , which contains 4 elements.

4. Which operator is used for floor division in Python?
A) /
B) %
C) //
D) **
// performs floor division (result is the quotient without the remainder). / is float
division, % is modulo, and ** is exponentiation.
5. How do you start a while loop that runs as long as x is less than 10?
A) while x < 10 {
B) while (x < 10)
C) while x < 10:
D) until x == 10:
Python loops and conditionals require a colon ( : ) at the end of the statement and use
indentation for the block of code.

, 6. What is the purpose of the break statement in a loop?
A) To skip the current iteration and move to the next.
B) To terminate the loop entirely.
C) To pause the script for a set amount of time.
D) To restart the loop from the first index.
break exits the loop immediately. continue skips the rest of the current block and
starts the next iteration.
7. Which dictionary method returns all the keys in the dictionary?
A) .get_keys()
B) .keys()
C) .all()
D) .index()
The .keys() method returns a view object containing the keys of the dictionary.
8. What does the strip() method do to a string?
A) It splits the string into a list.
B) It removes leading and trailing whitespace.
C) It converts the string to lowercase.
D) It replaces a character with another.
strip() cleans up a string by removing spaces, tabs, or newlines at the start and end.

9. In Python, what is the result of bool([]) ?
A) True
B) False
C) None
D) Error
Empty sequences (lists, tuples, strings) and the number 0 are evaluated as False in a
boolean context.
10. What is the index of the last element in a list named data ?
A) data[0]
B) data[len(data)]
C) data[-1]
D) data[last]
Python supports negative indexing. -1 refers to the last element, -2 to the second to
last, etc.

Información del documento

Subido en
15 de abril de 2026
Número de páginas
24
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$30.00

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Casewritters
3.8
(30)
Vendido
149
Seguidores
6
Artículos
1916
Última venta
1 hora hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes