Definitions of the terms used throughout the course.
A
- Abstraction
- A method of reducing complexity by hiding unnecessary details to make it easier to understand. For example, a function in Python hides the steps of its operation and just shows the inputs and outputs.
- Argument
- Arguments are values or expressions that are passed to a function when it is called. Functions use arguments to receive input data, perform operations, and return results. In Python, you can pass arguments to functions by enclosing them in parentheses when calling the function.
- Arithmetic Operator
- An arithmetic operator is a symbol used in programming to perform common mathematical operations. Examples include
+ for addition, - for subtraction, * for multiplication, / for division, and % for modulus.
- Assert statement
- A statement used to test if a condition in the code is true. If the condition is false, the program will raise an error and stop running.
- Assignment
- Assignment is the process of setting a value to a variable. It’s like putting a number or text into a storage box so you can use it later in your code.
B
- Body
- The part of the code that contains the statements to be executed. It is usually indented and follows a header.
- Boolean
- A data type that has one of two possible values,
True or False. For example, the statement 5 > 3 would return True.
- Built-in Functions
- Built-in functions are pre-defined functions provided by Python. These functions perform common tasks and are available for use without requiring additional code. Examples of built-in functions include
print(), len(), and input().
C
- Call
- The action of executing a function or method by using its name followed by parentheses. Arguments can be passed inside the parentheses.
- Call Expression
- A way to invoke (call) a function in Python. It consists of the function name followed by parentheses, which may contain arguments (values) that are passed to the function.
- Chaining
- Chaining refers to the practice of combining multiple method calls or operations in a single line of code. In Python, you can chain methods together by calling one method on the result of another method. For example, you can use
string.upper().strip() to convert a string to uppercase and remove any leading or trailing whitespace.
- Comment
- A comment is a note in the code that is not executed by the program. It is used to explain what the code does, making it easier to understand. Comments start with a
# symbol.
- Computer Science
- The study of computers and computing technologies. It’s about understanding computer systems and networks at a deep level. Python is often used in this field due to its simplicity and versatility.
D
- Data flow
- Data Flow refers to the path that data takes through a program, including how data is input, processed, and output. It involves the movement of data between variables, functions, and structures within the code.
- Data type
- A classification identifying one of various types of data. Python has several built-in data types like integers, floating-point numbers, strings, and lists.
- Debugger
- A tool that helps programmers test and debug their code by allowing them to run the code step-by-step and inspect variables.
- Debugging
- The process of finding and fixing errors or bugs in a program to ensure it runs correctly.
- Definition
- The part of the code where a function, class, or variable is declared and given a specific meaning or value.
- Docstring
- A special type of string that appears as the first statement inside a function, class, or module. It provides a description of the purpose, usage, and behavior of the code entity.
E
- Equality Comparison
- Equality Comparison checks if two values are the same. This is done using the
== operator, which returns True if the values are equal and False otherwise.
- Exception
- An error that occurs during the execution of a program, which disrupts the normal flow of instructions.
- Execute
- To run a program or command. When a Python script is executed, the commands it contains are performed.
- Expression
- An expression is a combination of values, variables, operators, and calls to functions that the program evaluates and returns a single value.
F
- Float
- A data type for numbers that have a decimal point. For example,
3.14 is a float.
- Function
- A function is a reusable block of code that performs a specific task. It’s like a mini-program within your program that you can run whenever you need it.
G
- Global frame
- Global Frame is the top-level environment where variables and functions are defined. It exists throughout the entire execution of the program and can be accessed from anywhere in the code.
- Global scope
- Global scope refers to the area of a program where a variable or function is accessible from any part of the code. Variables defined in the global scope can be used anywhere in the program.
- Global variable
- A global variable is a variable that is defined in the global scope and can be accessed and modified from any part of the program.
H
- Header
- The first line of a function or class definition that includes the keyword (like
def or class), the name, and any parameters.
I
- Indentation
- Indentation is the use of spaces or tabs at the beginning of a line of code to define the structure and hierarchy of the code. It is crucial for indicating blocks of code, such as loops and functions, and ensuring the code runs correctly.
- Index
- An index represents the position of an item within an ordered list or a string. It starts from 0, so the first element has an index of 0, the second has an index of 1, and so on.
- Input
- Data that is given to a program. For example, the
input() function in Python gets data from the user.
- Integer
- An integer in Python is a data type that represents whole numbers without any fractional or decimal parts. It’s like counting numbers such as 1, 2, 3, and so on.
L
- Literal values
- A value that is expressed as itself. For example,
'Hello, World!' is a string literal, and 42 is an integer literal in Python.
- Local frame
- Local Frame is a temporary environment created when a function is called. It contains variables and parameters specific to that function and is discarded once the function finishes executing.
- Local scope
- Local scope refers to the area of a program where a variable or function is accessible only within a specific block of code, such as inside a function. Variables defined in the local scope can only be used within that block.
M
- Method
- A method is a function that is associated with an object. Methods are called on specific objects and operate on their data. In Python, methods are defined within classes and are accessed using dot notation. For example,
list.append() is a method that adds an element to a list.
N
- Name
- An identifier used to label variables, functions, classes, or other objects. It must start with a letter or underscore and can contain letters, digits, and underscores.
- Name Error
- A Name Error occurs when a variable or function name is not found. This means the code is trying to use a name that hasn’t been defined yet.
- Nesting
- Nesting is when you place one set of code inside another, like a set of stacking dolls. In programming, this often means putting loops, functions, or conditions inside each other to create more complex structures.
- None
- A special constant in Python that represents the absence of a value or a null value.
O
- Operand
- An operand is an object that is manipulated by an operator. It’s like the numbers you add together in a math problem.
- Operator
- An operator is a symbol that tells the program to perform a specific mathematical, relational, or logical operation, like addition or comparison.
- Order of operations
- Order of operations is the set of rules that determines the sequence in which operations are performed in an expression, like PEMDAS in math.
- Output
- The result produced by a program. For example, the
print() function in Python sends data to the console as output.
P
- Parameter
- A parameter is a value that is passed into a function or method when it is called. It allows the function to perform specific actions or calculations based on the provided input. Parameters act as placeholders for data that can be customized each time the function is used.
- Parentheses
- Parentheses are curved symbols
( and ) used to group parts of an expression or to call functions. They determine the order of operations, with expressions inside parentheses being evaluated first.
- Print debugging
- A method of debugging where print statements are added to the code to display the values of variables at certain points.
- Print Statement
- A function used to display information. For example,
print('Hello, World!') displays the text 'Hello, World!' on the screen.
- Program
- A set of instructions that a computer can execute. A Python script is an example of a program.
- Programming
- The process of creating a set of instructions that tell a computer how to perform a task. Python is a popular language for programming due to its readability and simplicity.
- Programming Environment
- The set of processes and tools that are used to create computer software. This includes the Python interpreter, code editor, and possibly a debugger.
- Programming Language
- A formal language designed to communicate instructions to a machine, particularly a computer. Python is an example of a high-level programming language.
- Python
- A high-level, interpreted programming language known for its simplicity and readability. It supports multiple programming paradigms and has a large standard library.
- Python REPL
- A REPL, which stands for Read-Eval-Print Loop, is an interactive programming environment that allows you to write code and execute it to see the results immediately. Think of a REPL like a helpful robot that listens to your code commands, runs them right away, and shows you what happens. Here’s how it works: 1) Read: It looks at what you typed in. 2) Eval: It thinks about it and figures out what to do. 3) Print: It shows you the answer or what comes out of your code. 4) Loop: It’s ready to go again, waiting for your next piece of code. So, you can keep giving it code, and it will keep showing you what your code does, step by step. It’s a great way to learn coding by trying things out and seeing what happens!
R
- REPL
- A REPL, which stands for Read-Eval-Print Loop, is an interactive programming environment that allows you to write code and execute it to see the results immediately. Think of a REPL like a helpful robot that listens to your code commands, runs them right away, and shows you what happens. Here’s how it works: 1) Read: It looks at what you typed in. 2) Eval: It thinks about it and figures out what to do. 3) Print: It shows you the answer or what comes out of your code. 4) Loop: It’s ready to go again, waiting for your next piece of code. So, you can keep giving it code, and it will keep showing you what your code does, step by step. It’s a great way to learn coding by trying things out and seeing what happens!
- Return
- A statement used to exit a function and optionally pass back a value to the caller.
- Return Statement
- Used within a function to specify the value that the function should produce as its result. When encountered, the function immediately exits and returns the specified value to the caller.
- Return value
- A return value is the result that a function gives back after it finishes running. It’s like the answer you get after solving a math problem.
- Rubber Duck debugging
- A debugging method where a programmer explains their code line-by-line to a rubber duck or another inanimate object to find errors.
S
- Scientific method
- A systematic approach to problem-solving that involves making observations, forming a hypothesis, conducting experiments, and drawing conclusions.
- Scope
- Scope refers to the region of the code where a variable or function is accessible. It determines the visibility and lifetime of variables, with different scopes such as global and local.
- Semantics
- The meaning, logic, and intent of a piece of code. For example, the semantics of the Python keyword
def is that it is used to define a new function.
- Sequence
- An order of events or steps in a program. In Python, some sequence types are list, tuple, and range.
- Shell
- A shell is a user interface for accessing an operating system’s services. In Python, it refers to the interactive interpreter that lets you write and execute Python code directly.
- Statement
- A statement is a single line of code that performs an action or operation in Python. Statements can include assignments (e.g., assigning a value to a variable), loops (e.g., for loops or while loops), conditionals (e.g., if statements), and function calls. Each statement typically ends with a newline character.
- String
- A sequence of characters. In Python, strings are created by enclosing characters in quotes. For example,
'Hello, World!' is a string.
- String formatting
- String formatting is a way to insert values into a string. It allows you to create strings with placeholders that can be replaced with variables or values, making it easier to combine text and data.
- Syntax
- The set of rules that defines the combinations of symbols that are considered to be correctly structured programs in a language. Python syntax is known for being clean and easy to understand.
- Syntax Error
- A Syntax Error happens when there is a mistake in the code’s structure, like a missing parenthesis or colon. It prevents the code from running.
- Syntax error
- An error in the code that occurs when the rules of the programming language are not followed, preventing the code from running.
T
- Terminal
- The command-line interface (CLI) where you can run Python scripts and commands. It’s a text-based interface that allows developers to interact with the operating system and execute Python code.
- Terminate
- To stop a process. In Python, you might stop a script from running using a keyboard interrupt.
- Test case
- A set of conditions or inputs used to test a program to ensure it behaves as expected.
- Tool
- A program or device that helps perform a task or solve a problem. Python, with its many libraries and frameworks, is a tool for developing a wide range of applications.
- Traceback
- A report that shows the sequence of function calls that led to an error, helping to identify where the error occurred.
- Tracing
- Tracing involves following the execution of a program step-by-step to understand its flow and find errors. It helps in debugging by letting you see the order in which code statements run.
- Type
- Type refers to the kind of data that can be stored in a variable, such as numbers, text, or more complex structures like lists and dictionaries.
- Type conversion
- Type conversion is changing the data type of a value to another, like turning a number into text so you can print it with a message.
- Type Error
- A Type Error occurs when an operation or function is applied to an object of the wrong type, like trying to add a number and a string together.
U
- Unit test
- A type of test that checks if a small part of the program (a unit) works correctly. It helps ensure that individual components of the code function as expected.
V
- Value
- A value is the data stored in a variable or returned by an expression. It can be a number, text, list, or any other type of data.
- Value Error
- A Value Error happens when a function receives an argument of the right type but an inappropriate value, like passing a negative number to a function that expects a positive one.
- Variable
- A named location used to store data in the memory. For example, in Python, you might create a variable
x and give it the value 10 using the assignment statement x = 10.
W
- Wolf Fence debugging
- A debugging technique where the problem area is isolated by systematically testing sections of the code until the error is found.