python Flashcards

(77 cards)

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
A reserved word that is used to parse a program; you cannot use keywords like if, def, and while as variable names.
keyword
26
One of the values on which an operator operates.
operand
27
A combination of variables, operators, and values that represents a single result.
expression
28
To simplify an expression by performing the operations in order to yield a single value.
evaluate
29
A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.
statement
30
To run a statement and do what it says.
execute
31
A way of using the Python interpreter by typing code at the prompt.
interactive mode
32
A way of using the Python interpreter to read code from a script and run it.
script mode
33
A program stored in a file.
script
34
Rules governing the order in which expressions involving multiple operators and operands are evaluated.
order of operations (PEMDAS)
35
To join two operands end-to-end.
concatenate
36
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.
comment
37
An error in a program that makes it impossible to parse (and therefore impossible to interpret).
syntax error
38
An error that is detected while the program is running.
exception
39
The meaning of a program.
semantics
40
An error in a program that makes it do something other than what the programmer intended.
semantic error
41
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
42
A statement that creates a new function, specifying its name, parameters, and the statements it contains.
function definition
43
A value created by a function definition. The name of the function is a variable that refers to a function object.
function object
44
The first line of a function definition.
header
45
The sequence of statements inside a function definition.
body
46
A name used inside a function to refer to the value passed as an argument.
parameter
47
A statement that runs a function. It consists of the function name followed by an argument list in parentheses.
function call
48
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function
argument
49
A variable defined inside a function. A local variable can only be used inside its function.
local variable
50
The result of a function. If a function call is used as an expression, the return value is the value of the expression.
return value
51
A function that returns a value.
fruitful function
52
A function that always returns None.
void function
53
A special value returned by void functions.
None
54
A file that contains a collection of related functions and other definitions.
module
55
A statement that reads a module file and creates a module object.
import statement
56
A value created by an import statement that provides access to the values defined in a module.
module object
57
``` The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. ```
dot notation
58
Using an expression as part of a larger expression, or a statement as part of a larger statement.
composition
59
The order statements run in.
flow of execution
60
A graphical representation of a stack of functions, their variables, and the values they refer to.
stack diagram
61
A box in a stack diagram that represents a function call. It contains the local variables and parameters of the function.
frame
62
A list of the functions that are executing, printed when an exception occurs.
traceback
63
An operator, denoted //, that divides two numbers and rounds down (toward negative infinity) to an integer.
floor division
64
An operator, denoted with a percent sign (%), that works on integers and returns the remainder when one number is divided by another.
modulus operator
65
An expression whose value is either True or False.
boolean expression
66
One of the operators that compares its operands: ==, !=, >, =, and <=.
relational operator
67
One of the operators that combines boolean expressions: and, or, and not.
logical operator
68
A statement that controls the flow of execution depending on some condition.
conditional statement
69
The boolean expression in a conditional statement that determines which branch runs.
condition
70
A statement that consists of a header and a body. The header ends with a colon (:). The body is indented relative to the header.
compound statement
71
One of the alternative sequences of statements in a conditional statement.
branch
72
A conditional statement with a series of alternative branches.
chained conditional
73
A conditional statement that appears in one of the branches of another conditional statement.
nested conditional
74
A statement that causes a function to end immediately and return to the caller.
return statement
75
The process of calling the function that is currently executing.
recursion
76
A conditional branch in a recursive function that does not make a recursive call.
base case
77
A recursion that doesn’t have a base case, or never reaches it. Eventually, an infinite recursion causes a runtime error.
infinite recursion