• ¿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 27 páginas
Examen

WGU D849 General Biology I – OA Study Guide

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

WGU D849 General Biology I – OA Study Guide

Vista previa del contenido

WGU D522 Python for IT Automation – 50 Scenario-
Based Questions with Answers & Rationales
Below are 50 original scenario-based practice questions covering Python
fundamentals, file handling, data parsing, automation, and troubleshooting for the WGU
D522 Objective Assessment.




SECTION 1: PYTHON FUNDAMENTALS & SYNTAX
(Questions 1–12)

Question 1
Scenario: A developer is writing an automation script that needs to store a
configuration value for the maximum number of retry attempts. The value should never
change during script execution. Which naming convention should the developer use?

• A) maxRetries = 5
• B) max_retries = 5
• C) MAX_RETRIES = 5
• D) MaxRetries = 5

Answer: C

Rationale: Python uses all uppercase letters to signal that a variable is intended as a
constant. This is a naming convention that tells other developers the value should not
be modified. Python does not enforce immutability .

,Question 2
Scenario: An automation script processes a list of server hostnames. The developer
needs to remove duplicate hostnames while preserving the collection for iteration.
Which data type is most appropriate?

• A) List
• B) Tuple
• C) Set
• D) Dictionary

Answer: C

Rationale: Sets automatically eliminate duplicate values, making them ideal for storing
unique collections like hostnames. Lists allow duplicates, and tuples are immutable but
also allow duplicates .




Question 3
Scenario: A developer writes the following code:

python
a = [1, 2, 3]
b = a
b.append(4)
print(a)


What is printed?

• A) [1, 2, 3]
• B) [1, 2, 3, 4]
• C) [4, 1, 2, 3]
• D) [1, 2, 3][4]

, Answer: B

Rationale: Lists are mutable, and b = a creates an alias, not a copy. Modifying b also
modifies a. To create an independent copy, use b = a.copy() .




Question 4
Scenario: A script needs to extract the substring "Automation" from the string "IT
Automation". Which slice correctly extracts this?

• A) name[3:13]
• B) name[3:12]
• C) name[3:13]
• D) name[2:12]

Answer: C

Rationale: Slicing uses [start:stop] where start is inclusive and stop is exclusive. Index 3
is "A" and index 13 is the character after "n", producing "Automation" .




Question 5
Scenario: A developer needs to convert a user-provided string "42" into an integer for
mathematical operations. Which function should be used?

• A) str("42")
• B) int("42")
• C) float("42")
• D) bool("42")

Información del documento

Subido en
14 de septiembre de 2026
Número de páginas
27
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$22.49

¿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.
Tutoringclass
4.0
(275)
Vendido
142
Seguidores
60
Artículos
2565
Última venta
6 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