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
Examen

Introduction to Programming Final Exam Review (Python) Questions With Verified Answers

Puntuación
-
Vendido
-
Páginas
17
Grado
A+
Subido en
07-02-2024
Escrito en
2023/2024

A ________ does not prevent the program from running, but causes it to produce incorrect result - Answer Syntax Error A ______ is sequence of characters - Answer String A ____ is a name that references a value in the computer's memory - Answer Variable A _____ in python must be enclosed in either single or double-quotes - Answer String Literal Short notes placed in different parts of a program explaining how these parts of the program work are called - Answer Comments A(n) ______ makes a variable reference a value in the computer's memory - Answer Assignment Statement The ___ symbol marks the beginning of a comment in python - Answer # Values on the right and left of an operator symbol (+) are called: - Answer Operands ______ can be used to read input that has been typed on the keyboard - Answer input() having float(aroundSomething) - Answer converts to a float A magic number is an: - Answer unexplained value that appears in a program's code A _____ is a name that represents a value that does not change during the program's execution - Answer Named Constant First characters of a variable names: - Answer cannot be a number If a variable has not been assigned a value - Answer 0 will not display since the variable was not assigned 0 to begin with A _____ can execute a set of statements only certain circumstances - Answer Decision Structure A ____ provides one alternative path of executions - Answer Single Alternative Decision Boolean has a value of either - Answer True or False A compound boolean expression created with the "or" operator is true if: - Answer Either of its sub-expressions are true A ____ can be nested inside another decision structure - Answer Decision structure A compound boolean expression created with the "and" operator is true only when: - Answer Both sub-expression sare true The while loop is a ___ type of loop - Answer Pretest An ____ loop has no way of ending and repeats until the program is interrupted - Answer Infinite Loop The -= operator is an example of a(n) _______ - Answer augmented assignment operator A(n) ______ is a special value that signals when there are no more items from a list of items to be processed. This value cannot be mistaken as an item from the list - Answer sentinel It is _____ that a condition-controlled loop always repeats a specific number of times - Answer false x= x-1 does? - Answer subtracts 1 from x It is necessary to initialize ______ - Answer accumulator variables In a ________, the inner loop goes through all of its iterations for every single iteration of the outer loop - Answer nested loop To calculate the total number of iterations of a nested loop, you ____ the number of iterations of all the loops - Answer multiply Design technique that helps to reduce the duplication of code within a program and is a benefit of using functions is _____ - Answer code reuse The first line of a function definition is known as the _____ - Answer header You ____ a function to execute it - Answer call A ______ is a variable that is created inside a function - Answer local variable A(n) ____ is the part of a program in which a variable may be accessed - Answer Scope A(n) _______ is a piece of data that is sent into a function - Answer argument A(n) ______ is a special variable that receives a piece of data when a function is called - Answer parameter A variable that is visible to every function in a program file is a ________ - Answer global variable Library Function - Answer Prewritten function that is built into a programming language Standard library function returns random integer within a specific range of values - Answer randint ____ causes a function to end and sends a value back to the part of the program that called the function - Answer return A function can return more than one ___ - Answer value An ______ is a file that data is written too - Answer input file A file that data is read from is known as an ______ - Answer ouput file Before a file can be used by a program, it must be _____ - Answer opened When a program is using a file, is should do this - Answer close the file The contents of this type of file can be viewed in an editor such as notepad: - Answer text file When an exception is generated, it is said to be ____ - Answer raised This is a section of code that gracefully responds to exceptions - Answer exception handler You write this statement to respond to exceptions: - Answer try/except If you open a file using 'w' mode; the contents of the existing file will be ____ - Answer erased If you do not handle an exception is it ____ by the python interpreter, and the program ____ continue to execute - Answer not ignored, won't The else suite in a try/except statement ___ execute if a statement in the try suite raises an exception - Answer won't Finally suite in a try/except statement won't execute if a statement in the _______ raises an exception - Answer try suite An ____ refers to an individual item in a list - Answer elements An _____ identifies an item in a list - Answer index ____ is the first index in a list - Answer 0 The size of the list minus one is the ___ - Answer last index An ____ exception occurs if you try to use an index that is out of range of a list - Answer IndexError

Mostrar más Leer menos
Institución
Python Programming
Grado
Python Programming










Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Python Programming
Grado
Python Programming

Información del documento

Subido en
7 de febrero de 2024
Número de páginas
17
Escrito en
2023/2024
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$10.99
Accede al documento completo:

¿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

Conoce al vendedor

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.
Grademasters West Virginia University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
115
Miembro desde
3 año
Número de seguidores
68
Documentos
2599
Última venta
1 mes hace
Grademasters

3.8

46 reseñas

5
20
4
9
3
11
2
2
1
4

Documentos populares

Recientemente visto por ti

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