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

D522 Python for IT Automation Exam Question with Verified Correct Answers

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

D522 Python for IT Automation Exam Question with Verified Correct Answers

Vista previa del contenido

D522 Python for IT Automation Exam
Question with Verified Correct Answers
Naming Conflict

Occurs when global and local variables share the same name, potentially causing confusion.

Separation of Concerns

Using proper scope to keep program logic organized and maintainable.

Data Type

A classification that specifies the kind of value a variable can store.

Dynamic Typing (Python)

Python determines a variable's type at runtime without explicit declaration.

Integer (`x = 5`)

A numeric data type representing whole numbers.

Float (`y = 3.14`)

A numeric data type representing decimal numbers.

String (`message = "Hello"`)

A sequence of characters enclosed in single or double quotes.

Boolean (`is_true = True`)

A data type that represents either True or False.

List (`my_list = [1, 2, 3]`)

An ordered, mutable sequence of values.

,Tuple (`my_tuple = (1, 2, 3)`)

An ordered, immutable sequence of values.

Range (`my_range = range(5)`)

A sequence type representing a range of numbers.

Dictionary (`my_dict = {'key': 'value'}`)

A mapping type that stores key-value pairs.

Set (`my_set = {1, 2, 3}`)

An unordered collection of unique elements.

NoneType (`my_variable = None`)

Represents the absence of a value.

Type Casting (`int(42)` or `str(42)`)

Explicitly converting a value from one data type to another.

Integer (int) (`x = 5`)

A whole number without a decimal point that can be positive or negative.

Floating-Point (float) (`pi = 3.14`)

A number with a decimal point or scientific notation.

Scientific Notation (`2.0e3`)

A float representation using exponential notation equal to 2000.0.

Mixed-Type Promotion (`5 + 3.14`)

When an int and float are used together, Python automatically converts the result to float.

, Arithmetic with Integers (`x + y`)

Standard math operations applied to whole numbers.

int() Conversion (`int(3.14)`)

Converts a float to an integer by truncating the decimal portion.

float() Conversion (`float(5)`)

Converts an integer into a floating-point number.

round() Function (`round(3.14159, 2)`)

Rounds a number to a specified number of decimal places.

abs() Function (`abs(-5)`)

Returns the absolute (non-negative) value of a number.

Truncation (`int(3.99)`)

Drops the decimal portion instead of rounding when converting to int.

Random Module (`import random`)

Built-in module used to generate random numbers.

Random Range (`random.randrange(1, 101)`)

Generates a random integer within a specified range.

String (`greeting = "hello"`)

A sequence of characters enclosed in single or double quotes.

Multiline String (`"""line1\nline2"""`)

A string that spans multiple lines using triple quotes.

Información del documento

Subido en
15 de septiembre de 2026
Número de páginas
17
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$13.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.
KenAli
2.6
(18)
Vendido
125
Seguidores
5
Artículos
26522
Última venta
1 día 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