• ¿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 2 fuera de 11 páginas
Examen

CSC121 Python Midterm Exam Questions With Complete Solutions

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

CSC121 Python Midterm Exam Questions With Complete Solutions /. algorithm - Answer-A set of steps designed to generate the desired output /.A complete algorithm typically includes - Answer-A. input steps B. processing steps C. output steps /.processing steps - Answer-Steps that perform calculations and logical processing are called /.an input item - Answer-A program asks the user to enter the unit price of a chair and the quantity he is buying. It calculates and displays the total price. The unit price is /.an output item - Answer-A program asks the user to enter the unit price of a chair and the quantity he is buying. It calculates and displays the total price. The total price is /.missing output step - Answer-The following algorithm is designed to calculate and display the area of a rectangle: Step 1: Input length and width Step 2: Calculate area = length * width Anything wrong with this algorithm? /.missing input step - Answer-Hotdog is $3 each and soda is $0.75 each in a hotdog stand. The following algorithm is designed to calculate the total price for a customer's order: Step 1: Calculate total price = number of hotdogs * 3 + number of sodas * 0.75 Step 2: Display total price Anything wrong with this algorithm? /.incomplete processing step - Answer-Students in a course need to take an exam and complete a project. When the course grade is calculated, the exam is 70% while the prject is 30%. The following algorithm is designed to calculate course grade Step 1: Input exam score and project score Step 2: Calcuate exam score * 0.7 + project score * 0.3 Step 3: Display course grade Anything wrong with this algorithm? /.incorrect processing step - Answer-A music store is having a clearance sale. All CDs are 30% off. The following algorithm is desgined to calculate sale price: Step 1: Input original price Step 2: Calcuate sale price = original price * 0.30 Step 3: Display sale price Anything wrong with this algorithm? /.3 - Answer-The following algorithm is designed to calculate the total cost of buying chairs: Step 1: Input unit price Step 2: Input quantity Step 3: Calcuate total price = unit price * quantity Step 4: Display total price How many variables will there be if we execute this algorithm? /.first_exam - Answer-Which of the following Python variable name is valid? /.unitprice unitPrice unit_price - Answer-Which of the following Python variable names are valid? /.store data in computer memory - Answer-In Python, assignment statements are used to /.A. retrieves the value of y B. calculates the total of 5 and the value of y C. stores the result of the calculation in the variable x - Answer-What does the computer do when it executes the following statement: x = y + 5 /.20 - Answer-What is the output of the following Python program? x = 10 x = 20 print(x) /.2 - Answer-What is the output of the following Python program?

Vista previa del contenido

CSC121 Python Midterm Exam
Questions With Complete Solutions

/. algorithm - Answer-A set of steps designed to generate the desired output

/.A complete algorithm typically includes - Answer-A. input steps
B. processing steps
C. output steps

/.processing steps - Answer-Steps that perform calculations and logical processing are
called

/.an input item - Answer-A program asks the user to enter the unit price of a chair and
the quantity he is buying. It calculates and displays the total price. The unit price is

/.an output item - Answer-A program asks the user to enter the unit price of a chair and
the quantity he is buying. It calculates and displays the total price. The total price is

/.missing output step - Answer-The following algorithm is designed to calculate and
display the area of a rectangle:

Step 1: Input length and width
Step 2: Calculate area = length * width

Anything wrong with this algorithm?

/.missing input step - Answer-Hotdog is $3 each and soda is $0.75 each in a hotdog
stand. The following algorithm is designed to calculate the total price for a customer's
order:

Step 1: Calculate total price = number of hotdogs * 3 + number of sodas * 0.75
Step 2: Display total price

Anything wrong with this algorithm?

/.incomplete processing step - Answer-Students in a course need to take an exam and
complete a project. When the course grade is calculated, the exam is 70% while the
prject is 30%. The following algorithm is designed to calculate course grade

Step 1: Input exam score and project score
Step 2: Calcuate exam score * 0.7 + project score * 0.3
Step 3: Display course grade

, Anything wrong with this algorithm?

/.incorrect processing step - Answer-A music store is having a clearance sale. All CDs
are 30% off. The following algorithm is desgined to calculate sale price:

Step 1: Input original price
Step 2: Calcuate sale price = original price * 0.30
Step 3: Display sale price

Anything wrong with this algorithm?

/.3 - Answer-The following algorithm is designed to calculate the total cost of buying
chairs:

Step 1: Input unit price
Step 2: Input quantity
Step 3: Calcuate total price = unit price * quantity
Step 4: Display total price

How many variables will there be if we execute this algorithm?

/.first_exam - Answer-Which of the following Python variable name is valid?

/.unitprice
unitPrice
unit_price - Answer-Which of the following Python variable names are valid?

/.store data in computer memory - Answer-In Python, assignment statements are used
to

/.A. retrieves the value of y
B. calculates the total of 5 and the value of y
C. stores the result of the calculation in the variable x - Answer-What does the computer
do when it executes the following statement:

x=y+5

/.20 - Answer-What is the output of the following Python program?

x = 10
x = 20
print(x)

/.2 - Answer-What is the output of the following Python program?

Información del documento

Subido en
17 de junio de 2025
Número de páginas
11
Escrito en
2024/2025
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.
Brainariam
3.4
(30)
Vendido
160
Seguidores
7
Artículos
8386
Última venta
4 semanas 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