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 1 fuera de 3 páginas
Examen

CNIT 155 QUESTIONS AND ANSWERS

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

CNIT 155 QUESTIONS AND ANSWERS

Vista previa del contenido

CNIT 155 QUESTIONS AND ANSWERS


t/f: Files persist across multiple runs of your program. - Answers -t

t/f: Opening a file with write access causes the contents of the file to be removed first. -
Answers -t

t/f: Passing a list as an argument passes a copy of the list. - Answers -f

t/f: The input function returns a boolean if the user types in true. - Answers -f

t/f: In python, the division operator (/) gives a float result, even if both of the numbers
are integers. - Answers -t

t/f: If is a legal python identifier. - Answers -f

Which of the following is true about readlines()?
A. readlines() will only read one line
B. readlines() will only work if the file is larger than RAM
C. readlines() will process the contents in order
D. readlines() will return a list - Answers -d

Which of the following is an error that occurs when the file cannot be retrieved by the
python program?
A. FileNotFoundError
B. IOError
C. FileError
D. Both A and B - Answers -d

Which of the following will remove the second value from the list sampleList?
A. del sampleList[1]
B. remove sampleList[1]
C. remove sampleList[2]
D. del sampleList[2] - Answers -a

Given a tuple t = (3, 6, 2, 4), which of the following will result in errors?
A. print(t[2])
B. t[0] = 5
C. print(max(t))
D. print(len(t)) - Answers -b

What is the output of the following print statement?
sampleList[10, 20, 30, 40, 50, 60]
print(sampleList[-2]) - Answers -50

Información del documento

Subido en
24 de enero de 2026
Número de páginas
3
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$11.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.
GEEKA
3.8
(360)
Vendido
2132
Seguidores
1446
Artículos
57748
Última venta
1 hora 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