Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 30 páginas
Examen

Python for IT Automation Practice Exam With correct answers and rationale updated 2026 graded a+

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

Python for IT Automation Practice Exam With correct answers and rationale updated 2026 graded a+

Vista previa del contenido

Python for IT Automation Practice Exam
With correct answers and rationale
updated 2026 graded a+


1. What is the correct way to assign the string "hello" to a variable named greeting?

A. string greeting = "hello"

B. greeting <- "hello"

C. greeting = "hello"

D. var greeting = "hello"



Answer: C

Rationale: Python uses = for assignment and does not require variable type declarations.



2. Which data type is immutable in Python?

A. List

B. Dictionary

C. Set

D. Tuple



Answer: D

Rationale: Tuples cannot be modified after creation, while lists, dictionaries, and sets are mutable.



3. What will print(type(5)) display?

A. <type int>

B. <class 'int'>

C. int

D. integer



Answer: B

,Rationale: In Python 3, type(5) returns <class 'int'>.



4. Which of the following creates a list?

A. {1, 2, 3}

B. (1, 2, 3)

C. [1, 2, 3]

D. <1, 2, 3>



Answer: C

Rationale: Square brackets define a list in Python.



5. What is the result of 3 + 2 * 4?

A. 20

B. 11

C. 14

D. 24



Answer: B

Rationale: Multiplication happens before addition, so 2 * 4 = 8, then 3 + 8 = 11.



6. Which statement is used to make decisions in Python?

A. switch

B. select

C. if

D. case



Answer: C

Rationale: Python uses if, elif, and else for conditional logic.



7. What is the output of print("7" + "3")?

A. 10

, B. 73

C. 7 3

D. Error



Answer: B

Rationale: Both operands are strings, so + concatenates them.



8. Which loop is best when you know how many times you want to repeat?

A. while

B. for

C. repeat

D. do-while



Answer: B

Rationale: A for loop is commonly used when iterating over a known sequence or range.



9. What does len("python") return?

A. 5

B. 6

C. 7

D. Error



Answer: B

Rationale: The string "python" contains 6 characters.



10. Which of the following is a valid Python comment?

A. // comment

B. <!-- comment -->

C. # comment

D. ** comment **

Información del documento

Subido en
15 de septiembre de 2026
Número de páginas
30
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$24.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

Vendido
0
Seguidores
0
Artículos
184
Última venta
-



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