1/90
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Bug
An error in a program.
CPU
The heart of any computer. It is what runs the software that we write; also called “CPU” or “the processor”.
Compile
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution.
High-Level Launguage
A programming language like Python that is designed to be easy for humans to read and write.
Interactive Mode
A way of using the Python interpreter by typing commands and expressions at the prompt.
Interpret
To execute a program in a high-level language by translating it one line at a time.
Low-Level Language
A programming language that is designed to be easy for a computer to execute; also called “machine code” or “assembly language”.
Machine Code
The lowest-level language for software, which is the language that is directly executed by the central processing unit (CPU).
Main Memory
Stores programs and data. Main memory loses its information when the power is turned off.
Parse
To examine a program and analyze the syntactic structure.
Portability
A property of a program that can run on more than one kind of computer.
Print Function
An instruction that causes the Python interpreter to display a value on the screen.
Problem Solving
The process of formulating a problem, finding a solution, and expressing the solution.
Program
A set of instructions that specifies a computation.
Prompt
When a program displays a message and pauses for the user to type some input to the program.
Secondary Memory
Stores programs and data and retains its information even when the power is turned off. Generally slower than main memory. Examples of secondary memory include disk drives and flash memory in USB sticks.
Semantics
The meaning of a program.
Semantic Error
An error in a program that makes it do something other than what the programmer intended.
Source Code
A program in a high-level language
Assignment
A statement that assigns a value to a variable
Concatenate
To join two operands end to end.
Comment
Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.
Evaluate
To simplify an expression by performing the operations in order to yield a single value.
Expression
A combination of variables, operators, and values that represents a single result value.
Floating Point
A type that represents numbers with fractional parts.
Integer
A type that represents whole numbers.
Keyword
A reserved word that is used by the compiler to parse a program; you cannot use keywords like if
, def
, and while
as variable names.
Mnemonic
A memory aid. We often give variables mnemonic names to help us remember what is stored in the variable.
Modulus Operator
An operator, denoted with a percent sign (%
), that works on integers and yields the remainder when one number is divided by another.
Operand
One of the values on which an operator operates.
Operator
A special symbol that represents a simple computation like addition, multiplication, or string concatenation
Rules of Precedence
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.
Statement
A section of code that represents a command or action. So far, the statements we have seen are assignments and print expression statement.
String
A type that represents sequences of characters.
Type
A category of values. The types we have seen so far are integers (type int
), floating-point numbers (type float
), and strings (type str
).
Value
One of the basic units of data, like a number or string, that a program manipulates.
Variable
A name that refers to a value.
Algorithm
A general process for solving a category of problems.
Argument
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
Function Body
The sequence of statements inside a function definition.
Composition
Using an expression as part of a larger expression, or a statement as part of a larger statement.
Deterministic
Pertaining to a program that does the same thing each time it runs given the same inputs.
Dot Notation
The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name.
Flow or Execution
The order in which statements are executed during a program run.
Fruitful Function
A function that returns a value.
Function
A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not return a value.
Function Call
A statement that executes a function. It consists of the function name followed by an argument list.
Function Object
A value created by a function definition. The name of the function is a variable that refers to a function object.
Header
The first line of a function definition.
Import Statement
A statement that reads a module file and creates a module object.
Module Object
A value created by an import statement that provides access to the data and code defined in a module.
Parameter
A name used inside a function to refer to the value passed as an argument.
Pseudorandom
Pertaining to a sequence of numbers that appear to be random, but are generated by a deterministic program.
Return Value
The result of a function. If a function call is used as an expression, the return value is the value of the expression.
Void Function
A function that does not have a return value.
Body
The sequence of statements within a compound statement.
Boolean Expression
An expression whose value is either True
or False
.
Branch
One of the alternative sequences of statements in a conditional statement.
Chained Conditional
A conditional statement with a series of alternative branches.
Comparison Operator
One of the operators that compares its operands: ==
, !=
, >
, <
, >=
, and <=
.
Conditional Statement
A statement that controls the flow of execution depending on some condition.
Condition
The boolean expression in a conditional statement that determines which branch is executed.
Compound Statement
A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.
Guardian Pattern
Where we construct a logical expression with additional comparisons to take advantage of the short-circuit behavior.
Logical Operator
One of the operators that combines boolean expressions: and
, or
, and not
.
Nested Conditional
A conditional statement that appears in one of the branches of another conditional statement.
Traceback
A list of the functions that are executing, printed when an exception occurs.
Short Circuit
When Python is part-way through evaluating a logical expression and stops the evaluation because Python knows the final value for the expression without needing to evaluate the rest of the expression.
Accumulator
A variable used in a loop to add up or accumulate a result.
Loop Counter
A variable used in a loop to count the number of times something happened. We initialize a counter to zero then increment the counter each time we want to “count” something.
Decrement
To decrease the value of a variable (often by one).
Initialize
To give an initial value to a variable that will be updated.
Infinite Loop
A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
Iteration
One repeated execution of a set of statements using either a function that calls itself or a loop.
Increment
To increase the value of a variable (often by one).
Counter
A variable used to count something. It’s usually initialized to zero and then incremented.
Empty String
A string with no characters and length 0, represented by two quotation marks.
Format Operator
An operator, %
, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.
Format Sequence
A sequence of characters in a format string, like %d
, that specifies how a value should be formatted.
Format String
A string, used with the format operator, that contains format sequences.
Flag
A boolean variable used to indicate whether a condition is true or false.
Invocation
A statement that calls a method.
Immutable
A property of sequences whose items cannot be reassigned.
String Index
An integer value used to select a character in a string.
Item
One of the values in a sequence.
Method
A function that is associated with an object and called using dot notation.
String Object
A string that a variable can refer to. For now, you can use “object” and “value” interchangeably.
Search
A pattern of traversal that stops when it finds what it is looking for.
Sequence
An ordered set; that is, a set of values where each value is identified by an integer index
Slice
A part of a string specified by a range of indicies.
Traverse
To iterate through the items in a sequence, performing a similar operation on each.