Chapter 2 Variables, Expressions and Statements Flashcards
Variable
A name that refers to a value
Assignment
A statement that assigns a value to a variable.
State Diagram
A graphical representation of a set of variables and the values they refer to.
Keyword
A reserved word that is used to parse a program; you cannot use keywords like it, def and while as variable names.
Operand
One of the values on which an operator operates.
Expression
A combination of variables, operators and values that represents a single result.
Evaluate
To simplify an expression by performing the operations in order to yield a single value.
Statement
A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.
Execute
To run a statement and do what is says.
Interactive mode
A way of using the Python interpreter by typing code at the prompt.
Script mode
A way of using the Python interpreter to read code from a script and run it.
Script
A program stored in a file.
Order of operations
rules governing the order in which expressions involving multiple operators and operands are evaluated.
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.