100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

WGU D522 Objective Assessment | Python for IT Automation | ACTUAL EXAM | Questions & Verified Answers | Latest 2025 / 2026 Update – Western Governors University

Puntuación
-
Vendido
-
Páginas
37
Grado
A
Subido en
12-12-2025
Escrito en
2025/2026

WGU D522 Objective Assessment | Python for IT Automation | ACTUAL EXAM | Questions & Verified Answers | Latest 2025 / 2026 Update – Western Governors University

Institución
WGU D522
Grado
WGU D522











Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
WGU D522
Grado
WGU D522

Información del documento

Subido en
12 de diciembre de 2025
Número de páginas
37
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

WGU D522 Objective Assessment | Python for IT Automation |
ACTUAL EXAM | Questions & Verified Answers | Latest 2025 /
2026 Update – Western Governors University

1.​

Which Python data type is best suited to store a static lookup table that maps VLAN IDs
(integers) to VLAN names (strings) and provides O(1) average-time lookups?

A. list

B. set

C. dict

D. tuple

Correct Answer: C

Rationale: A dict (hash map) gives constant-time average lookups via hashing. A list (A)
would require O(n) linear search. A set (B) only stores keys, not key-value pairs. A tuple
(D) is immutable and lacks efficient keyed access.

2.​

What is the output of the following snippet?

PythonCopy

x = [1, 2, 3]
y = x
x.append(4)
print(y)


A. [1, 2, 3]

,B. [1, 2, 3, 4]

C. [4, 3, 2, 1]

D. TypeError

Correct Answer: B

Rationale: Both x and y reference the same list object in memory; mutating via either
name is visible through both. Appending 4 modifies the shared object, so y reflects the
change. No error occurs because list.append is valid.

3.​

Which statement about Python’s Global Interpreter Lock (GIL) is accurate in CPython
3.11?

A. It allows true parallel execution of multiple threads in a single process.

B. It is released during I/O-bound operations, enabling concurrency.

C. It is bypassed automatically when using the multiprocessing module.

D. Both B and C are correct.

Correct Answer: D

Rationale: The GIL prevents simultaneous execution of Python bytecode by multiple
threads in one process (so A is false), but it is released around blocking I/O syscalls (B),
and the multiprocessing module creates separate processes, each with its own GIL (C),
enabling true parallelism.

4.​

Which exception will be raised by int('abc')?

,A. ValueError

B. TypeError

C. SyntaxError

D. OverflowError

Correct Answer: A

Rationale: int() cannot parse the non-numeric string, raising ValueError. TypeError (B)
occurs when the argument type is wrong (e.g., int(None)). SyntaxError (C) is for invalid
Python code, and OverflowError (D) is for numbers too large.

5.​

Given re.search(r'^\d{3}-\d{3}-\d{4}$', phone), which string will match?


A. "555-123-4567"

B. "5551234567"

C. "(555) 123-4567"

D. "555-123-456"

Correct Answer: A

Rationale: The regex anchors at start/end and requires exactly three digits, hyphen,
three digits, hyphen, four digits. Only A fits. B lacks hyphens, C uses parentheses and
space, D has only three final digits.

6.​

, Which subprocess call safely executes ls -l /tmp and captures stdout as a string

while suppressing stderr?

A. subprocess.run(['ls', '-l', '/tmp'], stderr=subprocess.PIPE).stdout

B. subprocess.call('ls -l /tmp', shell=True, stderr=subprocess.DEVNULL)

C. subprocess.check_output(['ls', '-l', '/tmp'], stderr=subprocess.DEVNULL).decode()

D. os.system('ls -l /tmp 2>/dev/null')

Correct Answer: C

Rationale: check_output returns stdout bytes; decoding gives the string, and DEVNULL
discards stderr. Option A is missing decode and may return None if stdout not piped. B
returns exit code only. D does not capture output in Python and uses os.system, which
is discouraged.

7.​

What is returned by sorted({'b': 2, 'a': 1})?


A. {'a': 1, 'b': 2}

B. ['a', 'b']

C. ['b', 'a']

D. TypeError

Correct Answer: B

Rationale: sorted() iterates over dictionary keys (insertion-ordered in 3.7+) and returns a
new list of those keys in ascending order. It does not return the dict (A) or values (C).
$15.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
TommyRicks

Conoce al vendedor

Seller avatar
TommyRicks Chamberlain College Of Nursing
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
Nuevo en Stuvia
Miembro desde
3 semanas
Número de seguidores
0
Documentos
280
Última venta
-
TommyRicks

One stop shop for all all study materials, Study guides,Exams and all assignments and homeworks.

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

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