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 6 páginas
Examen

D278 Exam Questions and Correct Answers

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

D278 Exam Questions and Correct Answers

Vista previa del contenido

D278 Exam Questions and Correct Answers
What is the purpose of a variable?

A variable stores data that can be used and modified during a program's execution.

How do you save a value to a variable?

By using the assignment operator (=), e.g., x = 5.

What is a programming expression?

A combination of variables, constants, operators, and functions that evaluates to a value.

What is an identifier?

A name used to identify variables, functions, arrays, or other user-defined elements.

What constitutes a valid identifier?

Must start with a letter or underscore, followed by letters, digits, or underscores, and cannot be a

keyword.

What is a literal?

A fixed value in code, such as 5 or "hello".

What is an operator?

A symbol that performs operations on variables and values (e.g., +, -, *, /).

What precedence rules does programming use?

Defines the order in which operators are evaluated; parentheses > multiplication/division >

addition/subtraction.

How does an integer differ from a float?

Integers are whole numbers; floats contain decimal points.

What happens if you divide two integers?

Integer division gives an integer (in some languages, it truncates).

, What happens if you divide an integer and a float?

Integer/float returns a float.

What happens if you divide a nonzero floating point number by zero?

Typically results in infinity or a runtime error, depending on the language.

How do you convert an item's type?

Through type casting, like int(), float(), or str().

What does the modulo operator do?

Returns the remainder of a division (e.g., 5 % 2 = 1).

What is the difference in a variable and a constant?

A variable's value can change; a constant's value cannot.

How does an array work?

Stores multiple values in indexed positions.

What does index reference?

The position of an element in an array, starting at 0.

What is the purpose of each different data type?

Defines how data is stored and what operations can be performed on it.

How does a branch differ from a loop?

A branch chooses between alternatives; a loop repeats actions.

How does an if-else branch work?

Evaluates a condition and runs one block of code if true, another if false.

What does the equality operator do?

Compares two values to see if they are equal; it generally works across most primitive types.

What are the four relational operators?

Información del documento

Subido en
1 de agosto de 2026
Número de páginas
6
Escrito en
2026/2027
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

Vendido
0
Seguidores
0
Artículos
51
Ú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