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

Python Test Questions and Answers

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

Python Test Questions and Answers assignment statement - Answer-gives value to a variable statement - Answer-instruction that the Python interpreter can execute operators - Answer-special tokens that represent computations like addition, multiplication and division evaluate - Answer-To simplify an expression by performing the operations in order to yield a single value. int - Answer-A Python data type that holds positive and negative whole numbers float - Answer-A Python data type which stores floating-point numbers. Floating-point numbers are stored internally in two parts: a base and an exponent. When printed in the standard format, they look like decimal numbers flow of execution - Answer-The order in which statements are executed during a program run. function - Answer-A named sequence of statements that performs some useful operation. Functions may or may not take parameters and may or may not produce a result local variable - Answer-A variable defined inside a function. A local variable can only be used inside its function. Parameters of a function are also a special kind of local variable. boolean function - Answer-A function that returns a Boolean value. The only possible values of the bool type are False and True. block - Answer-A group of consecutive statements with the same indentation. boolean expression - Answer-An expression that is either true or false. conditional statement - Answer-A statement that controls the flow of execution depending on some condition. In Python the keywords if, elif, and else are used for conditional statements.

Vista previa del contenido

Python Test Questions and
Answers
assignment statement - Answer-gives value to a variable

statement - Answer-instruction that the Python interpreter can execute

operators - Answer-special tokens that represent computations like addition,
multiplication and division

evaluate - Answer-To simplify an expression by performing the operations in order to
yield a single value.

int - Answer-A Python data type that holds positive and negative whole numbers

float - Answer-A Python data type which stores floating-point numbers. Floating-point
numbers are stored internally in two parts: a base and an exponent. When printed in the
standard format, they look like decimal numbers

flow of execution - Answer-The order in which statements are executed during a
program run.

function - Answer-A named sequence of statements that performs some useful
operation. Functions may or may not take parameters and may or may not produce a
result

local variable - Answer-A variable defined inside a function. A local variable can only be
used inside its function. Parameters of a function are also a special kind of local
variable.

boolean function - Answer-A function that returns a Boolean value. The only possible
values of the bool type are False and True.

block - Answer-A group of consecutive statements with the same indentation.

boolean expression - Answer-An expression that is either true or false.

conditional statement - Answer-A statement that controls the flow of execution
depending on some condition. In Python the keywords if, elif, and else are used for
conditional statements.

, conditional statement - Answer-One program structure within another, such as a
conditional statement inside a branch of another conditional statement

dictionary - Answer-A collection of key/value pairs that maps from keys to values.

exception - Answer-Raised by the runtime system if something goes wrong while the
program is running.

file - Answer-A named entity, usually stored on a hard drive, floppy disk, or CD-ROM,
that contains a stream of characters.

format operator - Answer-The % operator takes a format string and a tuple of values
and generates a string by inserting the data values into the format string at the
appropriate locations.

sequence - Answer-A data type that is made up of elements organized linearly, with
each element accessed by an integer index.

str - Answer-converts to a string

argument - Answer-a value provided to a function when the function is called. This value
is assigned to the corresponding parameter in the function.

integer division - Answer-An operation that divides one integer by another and yields an
integer. Integer division yields only the whole number of times that the numerator is
divisible by the denominator and discards any remainder.

element - Answer-One of the values in a list (or other sequence). The bracket operator
selects elements of a list.

module - Answer-A file containing definitions and statements
intended to be imported by other programs.

What type of loop structure repeats the code a specific number of times - Answer-
Count-controlled loop

What type of loop structure repeats the code based on the value of the Boolean
expression - Answer-Condition-controlled loop

What is the format for the while clause in Python - Answer-while condition : statement

The variable used to keep the running total - Answer-Accumulator

_____ is the process of inspecting data that has been input to a program to make sure it
is valid before it is used in a computation. - Answer-Input validation

Información del documento

Subido en
12 de agosto de 2024
Número de páginas
7
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$13.39

¿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.
Perfectscorer
3.6
(77)
Vendido
510
Seguidores
355
Artículos
9461
Última venta
4 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