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 2 fuera de 9 páginas
Examen

CNIT 155 COMPREHENSIVE 2026 EXAM QUESTIONS AND SOLUTIONS RATED

Document preview thumbnail
Vista previa 2 fuera de 9 páginas

CNIT 155 COMPREHENSIVE 2026 EXAM QUESTIONS AND SOLUTIONS RATED

Vista previa del contenido

CNIT 155 COMPREHENSIVE 2026 EXAM QUESTIONS AND
SOLUTIONS RATED A+
✔✔Which output will the following code produce?
color = []
color = ["blue", "green", "red"]
print(color[2]) - ✔✔red

✔✔Which of the following will randomize the order of elements in a list sampleList?
Assume that the required library has been imported correctly.
A. sort(sampleList)
B. shuffle(sampleList)
C. random(sampleList)
D. randomize(sampleList) - ✔✔B. shuffle(sampleList)

✔✔list1 = [1, 2, 3, 4]
list2 = [5, 6, 7, 8]
print ( len(list1 + list2) ) - ✔✔8

✔✔Passing a list as an argument passes a copy of the list. T/F - ✔✔False

✔✔Lists are mutable T/F - ✔✔True

✔✔The built-in function split() return a list T/F - ✔✔True

✔✔The index of the first value in a python list is 1 T/F - ✔✔False

✔✔Lists are a type of data structure that can store many values under one name T/F -
✔✔True

✔✔Analyze the following code:

count = 0
while count < 100:
#Point A
print("Welcome to Python!")
count += 1
#Point B
#Point C

A. count < 100 is always True at point c
B. count < 100 is always True at point b
C. All answers are False
D. count < 100 is always True at point A - ✔✔B. count < 100 is always True at point A

, ✔✔While loops are pretest loops T/F - ✔✔True

✔✔In Python, the division operator (/) gives a float result, even if both of the numbers
are integers T/F - ✔✔True

✔✔What is the output of the following code?

n = 20
while (n <= 25):
print(n,"\n")
n = n+1 - ✔✔20,21,22,23,24,25

✔✔If we want score to be a random number in the range of [10.0, 50.0), which
statement would be correct (assuming the random library has been imported)?

A. score = 40.0 * random + 10.0
B. score = 50.0 * random + 10.0
C. score = 10.0 * random + 40.0
D. score = random() + 50.0 - ✔✔A. score = 40.0 * random + 10.0

✔✔The expression 3 ** 3 - (6-2)/2 has the value _____. Is it an integer or a float value?
__________________.

A. 7, int
B. 25, float
C. 7, float
D. 25, int - ✔✔B. 25, float

✔✔Suppose you're given a list of words, intList. Write Python code that will print one
line for each number, repeating that number twice. For example, if intList is [60, 70, 80,
90], then your code would print:
60 60
70 70
80 80
90 90 - ✔✔def main():
intList = [60, 70, 80, 90]
for i in range(0, len(intList)):
print(intList[i], " ", intList[i], "\n")
i += 1
main()

✔✔Write a Python program to check if the letter 'e' is in a given string:

Example:

Información del documento

Subido en
16 de abril de 2026
Número de páginas
9
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$12.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.
BOARDWALK
3.5
(40)
Vendido
276
Seguidores
8
Artículos
32861
Ú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