• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 23 páginas
Examen

Wgu D522 V2 Python For It Automation Final Exam Study Guide

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

WGU D522 V2 PYTHON FOR IT AUTOMATION FINAL EXAM STUDY GUIDE

Vista previa del contenido

WGU D522 V2 PYTHON FOR IT
AUTOMATION FINAL EXAM STUDY
GUIDE




1. Which method is used in the ‘os’ module to change the current working directory of the

script?

A. os.path.move()


B. os.getcwd()


C. os.setdir()


D. os.chdir()


Answer: D


Conceptual Explanation: The os.chdir() function is used to change the current working

directory to a specified path.


2. When using the ‘csv’ module, which class allows you to map the information in each row to

a dictionary?

A. csv.Reader


B. csv.RowDict

,C. csv.DataMap


D. csv.DictReader


Answer: D


Conceptual Explanation: csv.DictReader creates an object that operates like a regular

reader but maps the information in each row to a dict whose keys are given by the optional

fieldnames parameter.


3. In regular expressions, which metacharacter matches the start of a string?

A. $


B. ^


C. *


D. .


Answer: B


Conceptual Explanation: The caret (^) symbol is used in regex to match the beginning of a

line or string.


4. What is the result of the expression: ‘Hello World’.split()?

A. (‘Hello’, ‘World’)


B. [‘Hello’, ‘World’]


C. ‘Hello’, ‘World’

, D. [‘H’, ‘e’, ‘l’, ‘l’, ‘o’, ’ ‘, ’W’, ‘o’, ‘r’, ‘l’, ‘d’]


Answer: B


Conceptual Explanation: The split() method without arguments splits a string into a list of

words using whitespace as the delimiter.


5. Which subprocess function is recommended for running a command and waiting for it to

finish while capturing the output?

A. subprocess.popen()


B. subprocess.call()


C. subprocess.execute()


D. subprocess.run()


Answer: D


Conceptual Explanation: subprocess.run() is the recommended approach for invoking

subprocesses in Python 3.5+.


6. How do you access the first command-line argument passed to a script (excluding the script

name)?

A. sys.argv[0]


B. sys.args[1]


C. sys.argv[1]


D. os.argv[1]

Información del documento

Subido en
31 de agosto de 2026
Número de páginas
23
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$15.99

¿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.
Thebright
3.6
(46)
Vendido
256
Seguidores
6
Artículos
15914
Última venta
5 días 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