100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

Python Programming Terms: 2025/2026 Study Guide

Puntuación
-
Vendido
-
Páginas
14
Grado
A+
Subido en
06-10-2025
Escrito en
2025/2026

Python Programming Terms: 2025/2026 Study Guide Core Syntax & Data Types 1. What is the difference between a list and a tuple? ANSWER A list is mutable, meaning its elements can be changed after creation (e.g., my_d(5)), and it is defined with square brackets []. A tuple is immutable, meaning its elements cannot be altered after creation, and it is defined with parentheses (). 2. What is a dictionary in Python? ANSWER A dictionary is an unordered, mutable collection of key-value pairs. Keys must be unique and of an immutable type (like strings, numbers, or tuples). It is defined with curly braces {} (e.g., {'name': 'Alice', 'age': 30}). 3. What is string slicing? ANSWER String slicing is a syntax for extracting a substring from a string. It uses the format [start:stop:step]. The start index is inclusive, the stop index is exclusive, and the step determines the increment. 4. What are f-strings? ANSWER f-strings (formatted string literals) are a way to embed expressions inside string literals for formatting, using a minimal syntax. They are prefixed with f or F and expressions are written inside curly braces (e.g., f"Hello, {name}!"). 5. What is the purpose of the None value? ANSWER None is a special constant in Python that represents the absence of a value or a null value. It is often used as a default return value for functions that do not explicitly return anything. 6. What is the difference between == and is? ANSWER The == operator compares the values of two objects to see if they are equal. The is operator compares the identity of two objects, checking if they refer to the exact same object in memory. 7. What is type hinting? ANSWER Type hinting is a feature that allows you to indicate the expected data types of function parameters, return values, and variables (e.g., def greet(name: str) -> str:). It improves code readability and enables better support from IDEs and static analysis tools. 8. What is a docstring? ANSWER A docstring is a string literal that occurs as the first statement in a module, function, class, or method definition. It is used to document the code and is accessible via the .__doc__ attribute or the help() function. 9. What is the pass statement used for? ANSWER The pass statement is a null operation; it does nothing. It is used as a placeholder where syntax requires a statement but no code needs to be executed, such as in stubs for incomplete functions or classes. 10. What is the difference between a shallow copy and a deep copy? ANSWER A shallow copy constructs a new compound object and then inserts references into it to the objects found in the original. A deep copy constructs a new compound object and then, recursively, inserts copies into it of the objects found in the original. Functions & Scope 11. What is a function in Python? ANSWER A function is a block of reusable code that is defined using the def keyword (or lambda for anonymous functions). It is designed to perform a specific task and can take parameters and return a value. 12. What is the difference between parameters and arguments? ANSWER Parameters are the variables listed inside the parentheses in the function definition. Arguments are the actual values passed to the function when it is called.

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
6 de octubre de 2025
Número de páginas
14
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

Python Programming Terms: 2025/2026 Study Guide

Core Syntax & Data Types

1. What is the difference between a list and a tuple?
ANSWER ✓ A list is mutable, meaning its elements can be changed after creation
(e.g., my_list.append(5)), and it is defined with square brackets []. A tuple is immutable,
meaning its elements cannot be altered after creation, and it is defined with
parentheses ().

2. What is a dictionary in Python?
ANSWER ✓ A dictionary is an unordered, mutable collection of key-value pairs. Keys
must be unique and of an immutable type (like strings, numbers, or tuples). It is defined
with curly braces {} (e.g., {'name': 'Alice', 'age': 30}).

3. What is string slicing?
ANSWER ✓ String slicing is a syntax for extracting a substring from a string. It uses the
format [start:stop:step]. The start index is inclusive, the stop index is exclusive, and
the step determines the increment.

4. What are f-strings?
ANSWER ✓ f-strings (formatted string literals) are a way to embed expressions inside
string literals for formatting, using a minimal syntax. They are prefixed with f or F and
expressions are written inside curly braces (e.g., f"Hello, {name}!").

5. What is the purpose of the None value?
ANSWER ✓ None is a special constant in Python that represents the absence of a value or
a null value. It is often used as a default return value for functions that do not explicitly
return anything.

6. What is the difference between == and is?
ANSWER ✓ The == operator compares the values of two objects to see if they are equal.
The is operator compares the identity of two objects, checking if they refer to the exact
same object in memory.

7. What is type hinting?
ANSWER ✓ Type hinting is a feature that allows you to indicate the expected data types
of function parameters, return values, and variables (e.g., def greet(name: str) -> str:).
It improves code readability and enables better support from IDEs and static analysis
tools.

, 8. What is a docstring?
ANSWER ✓ A docstring is a string literal that occurs as the first statement in a module,
function, class, or method definition. It is used to document the code and is accessible
via the .__doc__ attribute or the help() function.

9. What is the pass statement used for?
ANSWER ✓ The pass statement is a null operation; it does nothing. It is used as a
placeholder where syntax requires a statement but no code needs to be executed, such
as in stubs for incomplete functions or classes.

10. What is the difference between a shallow copy and a deep copy?
ANSWER ✓ A shallow copy constructs a new compound object and then
inserts references into it to the objects found in the original. A deep copy constructs a
new compound object and then, recursively, inserts copies into it of the objects found in
the original.

Functions & Scope

11. What is a function in Python?
ANSWER ✓ A function is a block of reusable code that is defined using the def keyword
(or lambda for anonymous functions). It is designed to perform a specific task and can
take parameters and return a value.

12. What is the difference between parameters and arguments?
ANSWER ✓ Parameters are the variables listed inside the parentheses in the function
definition. Arguments are the actual values passed to the function when it is called.

13. What are *args and **kwargs?
ANSWER ✓ *args allows a function to accept any number of positional arguments. These
arguments are collected into a tuple. **kwargs allows a function to accept any number of
keyword arguments. These arguments are collected into a dictionary.

14. What is a lambda function?
ANSWER ✓ A lambda function is a small, anonymous function defined with
the lambda keyword. It can have any number of arguments but only one expression,
which is evaluated and returned (e.g., lambda x: x**2).

15. What is a decorator?
ANSWER ✓ A decorator is a design pattern in Python that allows a user to add new
functionality to an existing object (like a function or class) without modifying its
structure. It is a function that takes another function as an argument and returns a
modified function.
$15.59
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

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.
SmartscoreAaron Chicago State University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
34
Miembro desde
1 año
Número de seguidores
3
Documentos
2988
Última venta
8 horas hace
SMARTSCORES LIBRARY

Get top-tier academic support for Psychology, Nursing, Business, Engineering, HRM, Math, and more. Our team of professional tutors delivers high-quality homework, quiz, and exam assistance—ensuring scholarly excellence and grade-boosting results. Trust our collaborative expertise to help you succeed in any course at U.S.A Institutions.

3.8

4 reseñas

5
2
4
1
3
0
2
0
1
1

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