python Flashcards

1
Q

he process of formulating a problem, finding a solution, and expressing
it.

A

problem solving

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A programming language like Python that is designed to be easy for
humans to read and write.

A

high-level language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A programming language that is designed to be easy for a computer
to run; also called “machine language” or “assembly language”.

A

low-level language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A property of a program that can run on more than one kind of computer

A

portability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A program that reads another program and executes it

A

interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Characters displayed by the interpreter to indicate that it is ready to take input
from the user.

A

prompt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A set of instructions that specifies a computation.

A

program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

An instruction that causes the Python interpreter to display a value on
the screen.

A

print statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A special symbol that represents a simple computation like addition, multiplication,
or string concatenation.

A

operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

One of the basic units of data, like a number or string, that a program manipulates

A

value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A category of values. The types we have seen so far are integers (type int), floatingpoint
numbers (type float), and strings (type str).

A

type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A type that represents whole numbers

A

Integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A type that represents numbers with fractional parts.

A

floating-point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

A type that represents sequences of characters.

A

string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Any one of the languages that people speak that evolved naturally.

A

natural language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Any one of the languages that people have designed for specific purposes,
such as representing mathematical ideas or computer programs; all programming
languages are formal languages.

A

formal language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

One of the basic elements of the syntactic structure of a program, analogous to a
word in a natural language.

A

token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The rules that govern the structure of a program.

A

syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

To examine a program and analyze the syntactic structure.

A

parse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

An error in a program.

A

bug

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The process of finding and correcting bugs.

A

debugging

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A name that refers to a value.

A

variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

A statement that assigns a value to a variable.

A

assignment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

A graphical representation of a set of variables and the values they refer to.

A

state diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

A reserved word that is used to parse a program; you cannot use keywords like
if, def, and while as variable names.

A

keyword

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

One of the values on which an operator operates.

A

operand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

A combination of variables, operators, and values that represents a single result.

A

expression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

To simplify an expression by performing the operations in order to yield a single
value.

A

evaluate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

A section of code that represents a command or action. So far, the statements
we have seen are assignments and print statements.

A

statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

To run a statement and do what it says.

A

execute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

A way of using the Python interpreter by typing code at the prompt.

A

interactive mode

32
Q

A way of using the Python interpreter to read code from a script and run it.

A

script mode

33
Q

A program stored in a file.

A

script

34
Q

Rules governing the order in which expressions involving multiple
operators and operands are evaluated.

A

order of operations (PEMDAS)

35
Q

To join two operands end-to-end.

A

concatenate

36
Q

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.

A

comment

37
Q

An error in a program that makes it impossible to parse (and therefore impossible
to interpret).

A

syntax error

38
Q

An error that is detected while the program is running.

A

exception

39
Q

The meaning of a program.

A

semantics

40
Q

An error in a program that makes it do something other than what the
programmer intended.

A

semantic error

41
Q

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.

A

function

42
Q

A statement that creates a new function, specifying its name, parameters,
and the statements it contains.

A

function definition

43
Q

A value created by a function definition. The name of the function is a
variable that refers to a function object.

A

function object

44
Q

The first line of a function definition.

A

header

45
Q

The sequence of statements inside a function definition.

A

body

46
Q

A name used inside a function to refer to the value passed as an argument.

A

parameter

47
Q

A statement that runs a function. It consists of the function name followed
by an argument list in parentheses.

A

function call

48
Q

A value provided to a function when the function is called. This value is assigned
to the corresponding parameter in the function

A

argument

49
Q

A variable defined inside a function. A local variable can only be used
inside its function.

A

local variable

50
Q

The result of a function. If a function call is used as an expression, the return
value is the value of the expression.

A

return value

51
Q

A function that returns a value.

A

fruitful function

52
Q

A function that always returns None.

A

void function

53
Q

A special value returned by void functions.

A

None

54
Q

A file that contains a collection of related functions and other definitions.

A

module

55
Q

A statement that reads a module file and creates a module object.

A

import statement

56
Q

A value created by an import statement that provides access to the values
defined in a module.

A

module object

57
Q
The syntax for calling a function in another module by specifying the module
name followed by a dot (period) and the function name.
A

dot notation

58
Q

Using an expression as part of a larger expression, or a statement as part of
a larger statement.

A

composition

59
Q

The order statements run in.

A

flow of execution

60
Q

A graphical representation of a stack of functions, their variables, and the
values they refer to.

A

stack diagram

61
Q

A box in a stack diagram that represents a function call. It contains the local variables
and parameters of the function.

A

frame

62
Q

A list of the functions that are executing, printed when an exception occurs.

A

traceback

63
Q

An operator, denoted //, that divides two numbers and rounds down (toward
negative infinity) to an integer.

A

floor division

64
Q

An operator, denoted with a percent sign (%), that works on integers
and returns the remainder when one number is divided by another.

A

modulus operator

65
Q

An expression whose value is either True or False.

A

boolean expression

66
Q

One of the operators that compares its operands: ==, !=, >, =, and
<=.

A

relational operator

67
Q

One of the operators that combines boolean expressions: and, or, and
not.

A

logical operator

68
Q

A statement that controls the flow of execution depending on some
condition.

A

conditional statement

69
Q

The boolean expression in a conditional statement that determines which
branch runs.

A

condition

70
Q

A statement that consists of a header and a body. The header ends
with a colon (:). The body is indented relative to the header.

A

compound statement

71
Q

One of the alternative sequences of statements in a conditional statement.

A

branch

72
Q

A conditional statement with a series of alternative branches.

A

chained conditional

73
Q

A conditional statement that appears in one of the branches of another
conditional statement.

A

nested conditional

74
Q

A statement that causes a function to end immediately and return to the
caller.

A

return statement

75
Q

The process of calling the function that is currently executing.

A

recursion

76
Q

A conditional branch in a recursive function that does not make a recursive call.

A

base case

77
Q

A recursion that doesn’t have a base case, or never reaches it. Eventually,
an infinite recursion causes a runtime error.

A

infinite recursion