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
43
Grado
A+
Subido en
10-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
10 de diciembre de 2025
Número de páginas
43
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 Update – Western
Governors University

1

Which Python data type is best suited for storing a fixed collection of unique
host-names that must remain immutable?

A. list

B. set

C. tuple

D. dict

Correct Answer: C

Rationale: A tuple is immutable and, when it contains only strings, can be used as a
constant collection; sets (B) are mutable, lists (A) are ordered but mutable, and dict (D)
is mapping, not a simple collection.

2

What is the output of the following snippet?

print(type(lambda x: x * 2))

A. <class 'function'>

,B. <class 'lambda'>

C. <class 'method'>

D. <class 'int'>

Correct Answer: A

Rationale: A lambda expression creates an anonymous function object whose type is
function; Python has no separate lambda class (B), and it is neither a bound method (C)
nor an int (D).

3

Which statement accurately describes the difference between shutil.copy() and
shutil.copy2() in Python 3.12?

A. copy() duplicates file data and metadata; copy2() duplicates only data.

B. copy2() preserves original timestamps and mode bits; copy() does not.

C. copy() works on directories; copy2() works only on files.

D. copy2() returns a file handle; copy() returns None.

Correct Answer: B

Rationale: copy2() attempts to preserve all metadata including atime/mtime, whereas
copy() duplicates content and permission bits but not timestamps; neither returns a
handle (D) and both operate on files, not directories (C).

4

,A script uses subprocess.run(["ping", "-c", "2", "8.8.8.8"], capture_output=True, text=True)
and later prints proc.stderr. Which argument addition will discard all output and prevent
shell injection when the address is variable?

A. shell=True

B. stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL

C. stdin=subprocess.PIPE

D. check=True

Correct Answer: B

Rationale: Redirecting both streams to DEVNULL silences output and avoids injection
because no shell is invoked; shell=True (A) increases injection risk, while PIPE (C) and
check (D) do not discard data.

5

Which regular-expression pattern matches only a valid dotted-decimal IPv4 address in
capture group 1?

A. ^(\d{1,3}.){3}\d{1,3}


B.



(




[0−9]1,3

, )



˙







3[0−9]1,3




C. ^((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d).){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)


D.



(




\d+



)



˙
$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