There are many coding challenges to be found online, which can be used to exercise your Python skills.
additive color model
A way to represent colors as the sum of contributions from primary colors
such as red, green, and blue.
A value given to a function or program when it runs.
The term is often used interchangeably (and inconsistently) with parameter.
An expression which is supposed to be true at a particular point in a program.
Programmers typically put assertions in their code to check for errors;
if the assertion fails (i.e., if the expression evaluates as false),
the program halts and produces an error message.
See also: invariant, precondition,
To give a value a name by associating a variable with it.
(of a function): the statements that are executed when a function runs.
A data structure inside a running program that keeps track of active function calls.
Treating text as if upper and lower case characters of the same letter were the same.
See also: case-sensitive.
Treating text as if upper and lower case characters of the same letter are different.
See also: case-insensitive.
A remark in a program that is intended to help human readers understand what is going on,
but is ignored by the computer.
Comments in Python, R, and the Unix shell start with a # character and
run to the end of the line;
comments in SQL start with --,
and other languages have other conventions.
To apply one function to the result of another, such as f(g(x)).
A statement in a program that might or might not be executed
depending on whether a test is true or false.
(CSV) A common textual representation for tables
in which the values in each row are separated by commas.
A value to use for a parameter if nothing is specified explicitly.
The practice of writing programs that check their own operation
to catch errors as early as possible.
A character or characters used to separate individual values,
such as the commas between columns in a CSV file.
Short for “documentation string”,
this refers to textual documentation embedded in Python programs.
Unlike comments, docstrings are preserved in the running program
and can be examined in interactive sessions.
Human-language text written to explain what software does,
how it works, or how to use it.
A two-part notation used in many programming languages
in which thing.component refers to the component belonging to thing.
A character string containing no characters,
often thought of as the “zero” of text.
The practice of hiding something’s implementation details
so that the rest of a program can worry about what it does
rather than how it does it.
A number containing a fractional part and an exponent.
See also: integer.
A loop that is executed once for each value in some kind of set, list, or range.
See also: while loop.
A named group of instructions that is executed when the function’s name is used in
the code. Occurrence of a function name in the code is a function call.
Functions may process input arguments and return the result back. Functions
may also be used for logically grouping together pieces of code. In such cases, they don’t
need to return any meaningful value and can be written without the
return statement completely.
Such functions return a special value None, which is a way of saying “nothing” in Python.
A use of a function in another piece of software.
The value of immutable data cannot be altered after it has been created.
See also: mutable.
An operator such as += that provides a shorthand notation for
the common case in which the variable being assigned to
is also an operand on the right hand side of the assignment.
For example, the statement x += 3 means the same thing as x = x + 3.
A subscript that specifies the location of a single value in a collection,
such as a single pixel in an image.
A loop that is inside another loop. See also: outer loop.
A function which is tied to a particular object.
Each of an object’s methods typically implements one of the things it can do,
or one of the questions it can answer.
Changeable. The value of mutable data can be altered after it has been
created. See immutable.”
Interactive computational environment accessed via your web browser, in which you can write
and execute Python code and combine it with explanatory text, mathematics and visualizations.
Examples are IPython or Jupyter notebooks.
A collection of conceptually related variables (members) and
functions using those variables (methods).
A loop that contains another loop.
See also: inner loop.
A variable named in the function’s declaration that is used to
hold a value passed into the call.
The term is often used interchangeably (and inconsistently) with argument.
A connection from the output of one program to the input of another.
When two or more programs are connected in this way, they are called a “pipeline”.
A condition that a function (or other block of code) guarantees is true
once it has finished running.
Postconditions are often represented using assertions.
A condition that must be true in order for a function (or other block of code)
to run correctly.
To re-introduce a bug that was once fixed.
A statement that causes a function to stop executing and return a value
to its caller immediately.
An additive model
that represents colors as combinations of red, green, and blue.
Each color’s value is typically in the range 0..255
(i.e., a one-byte integer).
A collection of information that is presented in a specific order.
For example, in Python, a string is a sequence of characters,
while a list is a sequence of any variable.
An array’s dimensions, represented as a vector.
For example, a 5×3 array’s shape is (5,3).
Failing without producing any warning messages.
Silent failures are hard to detect and debug.
A regular subsequence of a larger sequence,
such as the first five elements or every second element.
A data structure that provides storage for a function’s local variables.
Each time a function is called, a new stack frame is created
and put on the top of the call stack. When the function returns,
the stack frame is discarded.
A process’s default input stream.
In interactive command-line applications,
it is typically connected to the keyboard; in a pipe,
it receives data from the standard output of the preceding process.
A process’s default output stream.
In interactive command-line applications,
data sent to standard output is displayed on the screen;
in a pipe,
it is passed to the standard input of the next process.
Short for “character string”,
a sequence of zero or more characters.
The rules that define how code must be written for a computer to understand.
A programming error that occurs when statements are in an order or contain characters
not expected by the programming language.
A program, device, data set, or human being
against which the results of a test can be compared.
The practice of writing unit tests before writing the code they test.
The sequence of function calls that led to an error.