100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

Python Programming Terms: 2025/2026 Study Guide

Beoordeling
-
Verkocht
-
Pagina's
14
Cijfer
A+
Geüpload op
06-10-2025
Geschreven 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.

Meer zien Lees minder
Instelling
Python Programming
Vak
Python Programming









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Python Programming
Vak
Python Programming

Documentinformatie

Geüpload op
6 oktober 2025
Aantal pagina's
14
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

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.

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
SmartscoreAaron Chicago State University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
34
Lid sinds
1 jaar
Aantal volgers
3
Documenten
2961
Laatst verkocht
1 week geleden
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 beoordelingen

5
2
4
1
3
0
2
0
1
1

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen