Both as a noun and as a verb, increment means to increase by 1.
Back
function
Front
A named sequence of statements that performs some useful operation. Functions may or may not take parameters and may or may not produce a result
Back
parameter
Front
A name used inside a function to refer to the value which was passed to it as an argument.
Back
conditional statement
Front
One program structure within another, such as a conditional statement inside a branch of another conditional statement
Back
semantic error
Front
An error in a program that makes it do something other than what the programmer intended.
Back
aliases
Front
Multiple variables that contain references to the same object.
Back
block
Front
A group of consecutive statements with the same indentation.
Back
low-level langauge
Front
A programming language that is designed to be easy for a computer to execute; also called machine language or assembly language
Back
token
Front
basic elements of a language(letters, numbers, symbols)
Back
global variable
Front
Can be seen through a program module, even inside of functions.
Back
assignment statement
Front
gives value to a variable
Back
syntax
Front
The structure of a program
Back
int
Front
A Python data type that holds positive and negative whole numbers
Back
flow of execution
Front
The order in which statements are executed during a program run.
Back
keyword
Front
define the language's syntax rules and structure, and they cannot be used as variable names
Back
None
Front
A special Python value. One use in Python is that it is returned by functions that do not execute a return statement with a return argument.
Back
conditional statement
Front
A statement that controls the flow of execution depending on some condition. In Python the keywords if, elif, and else are used for conditional statements.
Back
evaluate
Front
To simplify an expression by performing the operations in order to yield a single value.
Back
syntax error
Front
An error in a program that makes it impossible to parse — and therefore impossible to interpret.
Back
file
Front
A named entity, usually stored on a hard drive, floppy disk, or CD-ROM, that contains a stream of characters.
Back
iteration
Front
To repeat a section of code.
Back
statement
Front
instruction that the Python interpreter can execute
Back
print
Front
A function used in a program or script that causes the Python interpreter to display a value on its output device.
Back
compound data type
Front
A data type that is itself made up of elements that are themselves values.
Back
trace
Front
To follow the flow of execution of a program by hand, recording the change of state of the variables and any output produced.
Back
algorithm
Front
A set of specific steps for solving a category of problems
Back
float
Front
A Python data type which stores floating-point numbers. Floating-point numbers are stored internally in two parts: a base and an exponent. When printed in the standard format, they look like decimal numbers
Back
nested loop
Front
A loop inside the body of another loop.
Back
iteration
Front
Repeated execution of a set of programming statements.
Back
fruitful function
Front
A function that returns a value when it is called.
Back
boolean function
Front
A function that returns a Boolean value. The only possible values of the bool type are False and True.
Back
variable
Front
name that refers to a value
Back
format operator
Front
The % operator takes a format string and a tuple of values and generates a string by inserting the data values into the format string at the appropriate locations.
Back
boolean expression
Front
An expression that is either true or false.
Back
high-level language
Front
A programming language like Python that is designed to be easy for humans to read and write.
Back
clone
Front
To create a new object that has the same value as an existing object. Copying a reference to an object creates an alias but doesn't clone the object.
Back
exception
Front
Raised by the runtime system if something goes wrong while the program is running.
Back
decrement
Front
To subtract one from a variable.
Back
immutable type
Front
A compound data type whose elements can NOT be assigned new values.
Back
semantic
Front
the meaning of a program
Back
string
Front
contains a string of letters
Back
definite iteration
Front
A loop where we have an upper bound on the number of times the body will be executed. Definite iteration is usually best coded as a for loop
Back
bug
Front
an error in a program
Back
operators
Front
special tokens that represent computations like addition, multiplication and division
Back
comment
Front
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
Back
type conversion
Front
An explicit function call that takes a value of one type and computes a corresponding value of another type.
Back
modulus operator
Front
%, works on integers (and integer expressions) and gives the remainder when the first number is divided by the second
Back
local variable
Front
A variable defined inside a function. A local variable can only be used inside its function. Parameters of a function are also a special kind of local variable.
Back
runtime error
Front
An error that does not occur until the program has started to execute but that prevents the program from continuing.
Back
dictionary
Front
A collection of key/value pairs that maps from keys to values.
Back
Section 2
(50 cards)
True/False: Both of the following for clauses would generate the same number of loop iterations:
for num in range(4):
for num in range(1,5):
Front
True
Back
robot
Front
mechanism or an artificial entity that can be guided by automatic controls.
Back
lambda
Front
A piece of code which can be executed as if it were a function but without a name.
(It is also a keyword used to create such an anonymous function.)
Back
What is the disadvantage of coding in one long sequence structure?
Front
If parts of the duplicated code have to be corrected, the correction has to be made many times.
Back
What are the values that the variable num contains through the iterations of the following for loop?
for num in range(2, 9, 2)
Front
2, 4, 6, 8
Back
True/False: In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop.
Front
True
Back
mutable type
Front
A compound data type whose elements can be assigned new values.
Back
short circuit evaluation
Front
When a boolean expression is evaluated the evaluation starts at the left hand expression and proceeds to the right, stopping when it is no longer necessary to evaluate
any further to determine the final outcome.
Back
The acronym ?? refers to the fact that the computer cannot tell the difference between good data and bad data.
Front
GIGO
Back
True/False: In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested.
Front
True
Back
traverse
Front
To repeat an operation on all members of a set from the start to the end.
Back
Programs are commonly referred to as
Front
software
Back
A(n) ?? total is a sum of numbers that accumulates with each iteration of a loop.
Front
Running
Back
The variable used to keep the running total
Front
Accumulator
Back
nested list
Front
A list that is itself contained within a list.
Back
What type of loop structure repeats the code based on the value of the Boolean expression
Front
Condition-controlled loop
Back
The while loop is known as a(n) ?? loop because it tests conditions before performing an iteration.
Front
Pretest
Back
In Python, a comma-separated sequence of data items that are enclosed in a set of brackets is called a _____.
Front
list
Back
True/False: A better way to repeatedly perform an operation is to write the statements for the task once, and then place the statements in a loop that will repeat the statements as many times as necessary.
Front
True
Back
A(n) ?? is a special value that marks the end of a sequence of items.
Front
Sentinel
Back
str
Front
converts to a string
Back
pixel
Front
Smallest addressable element of a picture.
Back
What type of loop structure repeats the code a specific number of times
Front
Count-controlled loop
Back
Which of the following represents an example to calculate the sum of the numbers (accumulator)?
Front
total += number
Back
The ?? function is a built-in function that generates a list of integer values.
Front
Range
Back
integer division
Front
An operation that divides one integer by another and yields an integer. Integer division yields only the whole number of times that the numerator is divisible by the denominator and discards any remainder.
Back
In Python, the variable in the for clause is referred to as the _____ because it is the target of an assignment at the beginning of each loop iteration.
Front
Target Variable
Back
proprioception
Front
on a robot, internal sensing mechanisms. On a human, a sense of the relative positions of different parts of ones own body.
Back
slice
Front
A copy of part of a sequence specified by a series of indices.
Back
recursion
Front
The process of calling the currently executing function.
Back
A(n) ?? structure causes a statement or set of statements to execute repeatedly.
Front
Repetition
Back
What are the values that the variable num contains through the iterations of the following for loop?
for num in range(4)
Front
0, 1, 2, 3
Back
What is the format for the while clause in Python
Front
while condition :
Back
module
Front
A file containing definitions and statements
intended to be imported by other programs.
Back
True/False: In Python, an infinite loop usually occurs when the computer accesses the wrong memory address.
Front
False
Back
When will the following loop terminate?
while keep_on_going != 999 :
Front
When keep_on_going refers to a value equal to 999
Back
sequence
Front
A data type that is made up of elements organized linearly, with each element accessed by an integer index.
Back
True/False: The first line in the while loop is referred to as the condition clause.
Front
False
Back
operator
Front
A special symbol that represents a simple computation like addition, multiplication, or string concatenation.
Back
True/False: To get the total number of iterations of a nested loop, multiply the number of iterations of all the loops.
Front
True
Back
In Python, you would use the ?? statement to write a count-controlled loop.
Front
For
Back
True/False: The integrity of a program's output is only as good as the integrity of its input. For this reason the program should discard input that is invalid and prompt the user to enter correct data.
Front
True
Back
A(n) ?? validation loop is sometimes called an error trap or an error handler.
Front
Input
Back
A(n) ??-controlled loop causes a statement or set of statements to repeat as long as a condition is true.
Front
Condition
Back
The first input operation is called the _____, and its purpose is to get the first input value that will be tested by the validation loop.
Front
Priming read
Back
What is the structure that causes a statement or a set of statements to execute repeatedly?
Front
Repetition
Back
_____ is the process of inspecting data that has been input to a program to make sure it is valid before it is used in a computation.
Front
Input validation
Back
element
Front
One of the values in a list (or other sequence). The bracket operator selects elements of a list.
Back
argument
Front
a value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
Back
What is not an example of an augmented assignment operator
Front
<=
Back
Section 3
(50 cards)
_______________ is a type of memory that can hold data for long periods of time, even when there is no power to the computer.
Front
secondary storage
Back
True/False: All programs are normally stored in ROM and loaded into RAM as needed for processing.
Front
False
Back
True/False: A software developer is the person with the training to design, create, and test computer programs.
Front
True
Back
What is the largest value that can be stored in one byte?
Front
255
Back
True/False: The main reason for using secondary storage is to hold data for long periods of time, even when the power supply to the computer is turned off.
Front
True
Back
Which of the following is not a microprocessor manufacturing company?
Front
Dell
Back
The term _______________ refers to all of the physical devices that a computer is made of.
Front
hardware
Back
The _______________ is the part of a computer that actually runs programs and is the most important component in a computer.
Front
cpu
Back
_______________ are small central processing unit chips.
Front
micro processors
Back
True/False: The CPU is able to quickly access data stored at any random location in ROM.
Front
False
Back
True/False: The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.
Front
True
Back
True/False: The CPU understands instructions written in a binary machine language.
Front
True
Back
The program development cycle is made up of _____ steps that are repeated until no errors can be found in the program.
Front
3
Back
The output of the following print statement is:
print 'I\'m ready to begin'
Front
I'm ready to begin
Back
True/False: The Python language uses a compiler, which is a program that both translates and executes the instructions in a high level language.
Front
False
Back
A(n) _______________ is a set of instructions that a computer follows to perform a task.
Front
program
Back
The _____ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer memory.
Front
ASCII
Back
Which computer language uses short words known as mnemonics for writing programs?
Front
Assembly
Back
A disk drive stores data by _______________ encoding it onto a circular disk.
Front
magnetically
Back
After the execution of the following statement, the variable price will reference the value _____. price = int(68.549)
Front
68
Back
What symbol is used to mark the beginning and end of a string?
Front
Quotation
Back
True/False: Python formats all floating-point numbers to two decimal places when outputting using the print statement.
Front
False
Back
True/False: Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.
Front
True
Back
True/False: According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.
Front
False
Back
What is the encoding technique called that is used to store negative numbers in the computer's memory?
Front
two's complement
Back
The following is an example of an instruction written in which computer language? 10110000
Front
Machine language
Back
True/False: RAM is a volatile memory used for temporary storage while a program is running.
Front
True
Back
In a print statement, you can set the _____ argument to a space or empty string to stop the output from advancing to a new line.
Front
end
Back
True/False: A computer is a single device that performs different types of tasks for its users.
Front
False
Back
The _____ built-in function is used to read a number that has been typed on the keyboard.
Front
input()
Back
True/False: In Python, print statements written on separate lines do not necessarily output on separate lines.
Front
True
Back
What type of volatile memory is usually used only for temporary storage while running a program?
Front
RAM
Back
What is the output of the following print statement?
print('The path is D:\\sample\\test.')
Front
The path is D:\sample\test
Back
What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to be compiled or executed?
Front
pseudocode
Back
The _____ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.
Front
input
Back
The Python _______________ is a program that can read Python programming statements and execute them.
Front
interpreter
Back
Which of the following is considered to be the world's first programmable electronic computer
Front
ENIAC
Back
The disk drive is a secondary storage device that stores data by _____ encoding it onto a spinning circular disk.
Front
magnetically
Back
If value1 is 2.0 and value2 is 12, what is the output of the following command?
print(value1 * value2)
Front
24.0
Back
Which mathematical operator is used to raise five to the second power in Python?
Front
**
Back
The smallest storage location in a computer's memory
Front
bit
Back
True/False: Python allows programmers to break a statement into multiple lines.
Front
True
Back
Where does a computer store a program and the data that the program is working with while the program is running?
Front
Main memory
Back
What type of error produces incorrect results but does not prevent the program from running?
Front
logic
Back
After the execution of the following statement, the variable sold will reference the numeric literal value as a(n) _____ data type: sold = 256.752
Front
float
Back
In _______________ mode, the interpreter reads the contents of a file that contains Python statements and executes each statement.
Front
script
Back
The process known as the _____ cycle is used by the CPU to execute instructions in a program.
Front
fetch-decode-execute
Back
Main memory is commonly known as _______________.
Front
RAM
Back
A _____ has no moving parts, and operates faster than a traditional disk drive.
Front
solid state drive
Back
The line continuation character is a _____.
Front
\
Back
Section 4
(50 cards)
A(n) _____ structure is a logical design that controls the order in which a set of statements execute.
Front
control
Back
The _____ design technique can be used to break down an algorithm into functions.
Front
top-down
Back
The % symbol is the remainder operator and it is also known as the _______________ operator.
Front
modulus
Back
When the + operator is used with two strings, it performs string _______________.
Front
Concatenation
Back
The _____ argument specifies which parameter the argument should be passed into.
Front
keyword
Back
True/False: Expressions that are tested by the if statement are called Boolean expressions.
Front
True
Back
A(n) _______________ is a name that represents a value stored in the computer's memory.
Front
variable
Back
A(n) _______________ operator determines whether a specific relationship exists between two values.
Front
relational
Back
True/False: Short-circuit evaluation is performed with the not operator.
Front
False
Back
A(n) _______________ statement will execute one block of statements if its condition is true, or another block if its condition is false.
Front
if/else
Back
True/False: The not operator is a unitary operator and it must be a compound expression.
Front
False
Back
A(n) _______________ expression is made up of two or more Boolean expressions.
Front
compound
Back
True/False: The if statement causes one or more statements to execute only when a Boolean expression is true.
Front
True
Back
A(n) _____ constant is a global name that references a value that cannot be changed.
Front
global
Back
A(n) _____ is any piece of data that is passed into a function when the function is called.
Front
argument
Back
Boolean variables are commonly used as _______________ to indicate whether a specific condition exists.
Front
flags
Back
True/False: Decision structures are also known as selection structures.
Front
True
Back
True/False: The Python language is not sensitive to block structuring of code.
Front
False
Back
The _______________ statement is used to create a decision structure.
Front
If
Back
A(n) _____ chart is also known as a structured chart.
Front
hierarchy
Back
The Python library functions that are built into the Python _____ can be used by simply calling the function.
Front
interpreter
Back
_______________ are notes of explanation that document lines or sections of a program.
Front
comments
Back
When a function is called by its name, then it is _____.
Front
executed
Back
In flowcharting, the _______________ symbol is used to represent a Boolean expression.
Front
diamond
Back
A(n) _____ variable is accessible to all the functions in a program file.
Front
global
Back
What is a group of statements that exists within a program for the purpose of performing a specific task?
Front
function
Back
True/False: Python allows you to compare strings, but it is not case sensitive.
Front
False
Back
The _______________ specifier is a special set of characters that specify how a value should be formatted.
Front
formatting
Back
The decision structure that has two possible paths of execution is known as _____.
Front
double alternative
Back
The logical _______________ operator reverses the truth of a Boolean expression.
Front
not
Back
Python provides a special version of a decision structure known as the _______________ statement, which makes the logic of the nested decision structure simpler to write
Front
if elif else
Back
A(n) _____ variable is created inside a function.
Front
local
Back
A variable's _____ is the part of a program in which the variable may be accessed.
Front
scope
Back
A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____.
Front
block
Back
True/False: An action in a single alternative decision structure is performed only when the condition is true.
Front
True
Back
When applying the .3f formatting specifier to the following number, 76.15854, the result is _______________.
Front
76.159
Back
It is recommended that programmers should avoid using _____ variables in a program when possible.
Front
global
Back
The _____ of a local variable is the function in which the variable is created.
Front
scope
Back
A(n) _____ is a variable that receives an argument that is passed into a function.
Front
parameter
Back
Multiple Boolean expressions can be combined by using a logical operator to create _____ expressions.
Front
compound
Back
In a decision structure, the action is _______________ executed because it is performed only when a certain condition is true.
Front
conditionally
Back
True/False: The \t escape character causes the output to skip over to the next horizontal tab.
Front
True
Back
Boolean variable can reference one of two values: _____.
Front
true or false
Back
The first line in the function definition is known as the function _____.
Front
header
Back
A(n) _______________ character is a special character that is preceded with a backslash, appearing inside a string literal.
Front
escape
Back
When using the _____ operator, one or both subexpressions must be true for the compound expression to be true.
Front
Or
Back
Python uses _______________ to categorize values in memory.
Front
data types
Back
True/False: Nested decision structures are one way to test more than one condition.
Front
True
Back
A(n) _______________ decision structure provides only one alternative path of execution.
Front
single alternative
Back
Which logical operators perform short-circuit evaluation?
Front
or, and
Back
Section 5
(50 cards)
True/False: The randrange function returns a randomly selected value from a specific sequence of numbers.
Front
True
Back
True/False: Python function names follow the same rules for naming variables.
Front
True
Back
What is the result of the following statement?
x = random.randint(5, 15) * 2
Front
A random integer from 5 to 15, multiplied by 2, assigned to the variable x
Back
What type of function can be used to determine whether a number is even or odd?
Front
Boolean
Back
The main function contains a program's ______ logic, which is the overall logic of the program.
Front
mainline
Back
True/False: In Python, there is no restriction on the name of a module file.
Front
False
Back
The function header begins with the keyword ________ followed by the name of the function.
Front
def
Back
Which of the following statements causes the interpreter to load the contents of the random module into memory?
Front
import random
Back
What makes it easier to reuse the same code in more than one program?
Front
modules
Back
True/False: In Python, one can have a list of variables on the left side of the assignment operator.
Front
True
Back
Which of the following functions returns the largest integer that is less than or equal to x?
Front
floor
Back
True/False: The math function, atan(x), returns one tangent of x in radians.
Front
False
Back
A variable is visible only to statements in the variable's _____________.
Front
scope
Back
True/False: One of the drawbacks of a modularized program is that the only structure we could use is sequence structure.
Front
False
Back
The approach called _______ is taking a large task and dividing it into several smaller tasks that are easily performed.
Front
divide and conquer
Back
In a value-returning function, the value of the expression that follows the key word _____ will be sent back to the part of the program that called the function.
Front
return
Back
True/False: The value assigned to a global constant can be changed in the mainline logic.
Front
False
Back
True/False: A local variable can be accessed from anywhere in the program.
Front
False
Back
True/False: To assign a value to a global variable in a function, the global variable must first be declared in the function.
Front
True
Back
The _______ chart is an effective tool that programmers use for designing and documenting functions.
Front
IPO
Back
What type of value is returned by the functions random and uniform?
Front
float
Back
True/False: Unlike other languages, in Python, the number of values a function can return is limited to one.
Front
False
Back
hat does the following statement mean?
num1, num2 = get_num()
Front
The function get_num() is expected to return a value each for num1 and num2.
Back
A value-returning function is _____.
Front
a function that will return a value back to the part of the program that called it
Back
A value-returning function has a(n) _______ statement that returns a value back to the part of the program that called it.
Front
return
Back
Functions in the standard library are stored in files that are known as _______.
Front
modules
Back
True/False: One of the reasons not to use global variables is that it makes a program hard to debug.
Front
True
Back
True/False: The hierarchy chart shows all the steps that are taken inside a function.
Front
False
Back
Arguments are passed by _____ to the corresponding parameter variables in the function.
Front
position
Back
To refer to a function in a module, in our program we have to use the _____ notation.
Front
dot
Back
True/False: Different functions can have local variables with the same names.
Front
True
Back
The code for a function is known as a function __________.
Front
definition
Back
The term __________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output.
Front
black box
Back
In Python, a module's file name should end in ______________.
Front
.py
Back
A(n) ________ chart is a visual representation of the relationships between functions.
Front
hierarchy
Back
True/False: A function definition specifies what a function does and causes the function to execute.
Front
False
Back
Given the following function definition, what would the statement print magic(5) display?
def magic(num):
return num + 2 * 10
Front
25
Back
The Python standard library's _____ module contains numerous functions that can be used in mathematical calculations.
Front
math
Back
In a menu-driven program, what statement is used to determine and carry out the user's desired action?
Front
if-elif-else
Back
True/False: A value-returning function is like a simple function except that when it finishes it returns a value back to the called part of the program.
Front
True
Back
The top-down design breaks down the overall task of the program into a series of ____________.
Front
subtasks
Back
True/False: Python allows for passing multiple arguments to a function.
Front
True
Back
True/False: The function header marks the beginning of the function definition.
Front
True
Back
Python comes with _____ functions that have been already prewritten for the programmer.
Front
standard
Back
True/False: In a menu-driven program, a loop structure is used to determine the menu item the user selected.
Front
False
Back
The 'P' in the acronym IPO refers to _______________.
Front
processing
Back
True/False: Boolean functions are useful for simplifying complex conditions that are tested in decision and repetition structures.
Front
True
Back
In a flowchart, a function call is depicted by a(n) ______ that has vertical bars.
Front
rectangle
Back
True/False: The math function, ceil(x), returns the smallest integer that is greater than or equal to x.
Front
True
Back
Which of the following will assign a random number in the range of 1 through 50 to the variable number?
Front
number = random.randint(1, 50)
Back
Section 6
(3 cards)
The approach of ______ makes the program easier to understand, test, and maintain.
Front
modularization
Back
The return values of the trigonometric functions in Python are in ______________.
Front
radians
Back
A(n) _____ program displays a list of the operations on the screen and allows the user to select the operation that the program should perform.