1/90
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
bug
An error in a program
central processing unit
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 language
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 that refers to a memory location where we store 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.
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.
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 of 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 produce a result.
function call
A statement that executes a function. It consists of the function name followed by an argument list.
function definition
A statement that creates a new function, specifying its name, parameters, and the statements it executes.
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 return a value.
Snakecase
word_word
Camelcase
wordWord
Escape characters
\(character)
accumulator
A variable used in a loop to add up or accumulate a result.
counter
A variable used in a loop to count the number of times something happened. We initialize a counter to zero and then increment the counter each time we want to “count” something.
decrement
An update that decreases the value of a variable.
initialize
An assignment that gives an initial value to a variable that will be updated.
increment
An update that increases the value of a variable (often by one).
infinite loop
A loop in which the terminating condition is never satisfied or for which there is no terminating condition.
iteration
Repeated execution of a set of statements using either a function that calls itself or a loop.
ASCII
Older model of character translation between languages from characters to values (7/8 bits) -
Unicode
Current model of character translation between languages from characters to values (16 bits) - 165,000 characters
IDLE Shell
The interactive screen of Python
2 parts of the interactive screen:
shell/interpreter
editor/compiler
Fuzzy Logic
Uncertain or imprecise info by assigning true (1) and false (0)
Guido van Rossum
Creator of the language of Python
Logic errors
Good syntax, but mistake in order or relation of statements
Syntax errors
Violation of “grammar rules” in Python
4 R’s of Debugging
Reading
Running
Ruminating
Retreating
Call
To invoke a function - the store and reuse pattern
3 Types of Structures
Sequence
Decision/Conditional/Selection
Repition/Loops/Iteration
“debugging by bisection”
Break the program in half and print value near the middle of the program