1/91
Flashcards for reviewing key terms and definitions from the Python programming lecture notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
program
A set of instructions that a computer follows to perform a task.
hardware
The physical devices that a computer is made of.
the CPU
The part of a computer that runs programs.
microprocessors
Small chips that CPUs are known as today.
main memory
The computer stores a program and the data that the program is working with in this.
RAM
A volatile type of memory used for temporary storage while a program is running.
secondary storage
A type of memory that can hold data for long periods of time.
an input device
A component that collects data from people or other devices and sends it to the computer.
output
A video display is an example of this device type.
byte
A unit of memory sufficient to store a letter of the alphabet or a small number.
bits
A byte is made up of eight of these.
binary
A numbering system where all numeric values are written as 0s and 1s.
0
A bit that is turned off represents this value.
ASCII
A set of 128 numeric codes representing English letters and characters.
Unicode
An encoding scheme that can represent characters for many languages.
two’s complement
Technique used for encoding negative numbers.
floating point
Technique used for encoding real numbers.
pixels
The tiny dots of color that compose digital images.
a stream of binary numbers
What you would see in a machine language program.
decode
In the fetch-decode-execute cycle, this part involves determining which operation to perform.
machine language
The language that computers can only execute programs written in.
assembler
The tool that translates assembly language to machine language.
keywords
The words that make up a high-level programming language.
syntax
The rules that must be followed when writing a program.
compiler
A program that translates a high-level language program into machine language.
logic error
An error that does not prevent the program from running but causes incorrect results.
software requirement
A single function that the program must perform to satisfy the customer.
algorithm
A set of well-defined logical steps to perform a task.
pseudocode
An informal language with no syntax rules meant for understanding algorithms.
flowchart
A diagram that graphically depicts the steps in a program.
string
A sequence of characters.
variable
A name that references a value in memory.
user
A hypothetical person using the program and providing input.
single-quotes or double-quotes
A string literal in Python must be enclosed in these.
comments
Short notes explaining different parts of a program.
assignment statement
Makes a variable reference a value in memory.
#
This symbol marks the beginning of a comment in Python.
17 = x (you can’t assign to a literal)
Causes an error because you cannot assign a value to a literal.
operands
The values on the right and left of an operator.
//
The operator that performs integer division.
**
The operator that raises a number to a power.
%
The operator that returns the remainder of a division.
float
Data type referenced by price variable after assignment of 99.0.
input()
Built-in function to read input from the keyboard.
float()
Built-in function to convert an int to float.
magic number
An unexplained value appearing in a program’s code.
named constant
A name representing a value that does not change.
decision
A structure that can execute statements under certain circumstances.
single alternative decision
A structure that provides one alternative path of execution.
Boolean
An expression with a value of either True or False.
relational
Operators such as >, <, and ==.
dual alternative decision
A structure testing a condition, taking one path for true and another for false.
if
Statement used to write a single alternative decision structure.
if-else
Statement used to write a dual alternative decision structure.
logical
Operators like and, or, and not.
and
Operator that is true only if both subexpressions are true.
or
Operator that is true if either subexpression is true.
not
Operator that reverses a Boolean expression's logical value.
flag
A Boolean variable signaling when a condition exists.
condition
Type of loop that uses a true/false condition to control repetitions.
count
Type of loop that repeats a specific number of times.
iteration
Each repetition of a loop.
pretest
Type of loop represented by a while loop.
infinite
A loop with no way of ending.
augmented assignment
Type of operator exemplified by the -= operator.
accumulator
A variable keeping a running total.
sentinel
A special value signaling no more items from a list.
garbage in, garbage out
GIGO stands for this.
input
The integrity of program output depends on this.
priming read
The input operation appearing before a validation loop.
error traps
Validation loops are also known by this term.
function
A group of statements that perform a specific task in a program.
code reuse
A design technique that reduces code duplication.
header
The first line of a function definition.
call
To execute a function.
top-down design
Technique for breaking down an algorithm into functions.
hierarchy chart
A diagram showing relationships between functions in a program.
pass
Keyword ignored by Python interpreter, used as a placeholder.
local variable
A variable created inside a function.
scope
Part of a program where a variable may be accessed.
argument
A piece of data sent into a function.
parameter
A special variable receiving data when a function is called.
global variable
A variable visible to every function in a program.
global
Variable type to avoid using when possible.
library function
A prewritten function built into a programming language.
randint
Standard library function returning a random integer in a specified range.
random
Standard library function returning a random float from 0.0 up to 1.0.
uniform
Standard library function returning a random float within a specified range.
return
Statement causing a function to end and send a value back.
IPO chart
Design tool describing input, processing, and output of a function.
Boolean
Type of function returning either True or False.
sqrt
A math module function.