100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Python Programming Terms: 2025/2026 Study Guide

Rating
-
Sold
-
Pages
14
Grade
A+
Uploaded on
06-10-2025
Written in
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.

Show more Read less
Institution
Python Programming
Course
Python Programming









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Python Programming
Course
Python Programming

Document information

Uploaded on
October 6, 2025
Number of pages
14
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

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.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
SmartscoreAaron Chicago State University
Follow You need to be logged in order to follow users or courses
Sold
34
Member since
1 year
Number of followers
3
Documents
2970
Last sold
1 week ago
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 reviews

5
2
4
1
3
0
2
0
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions