Module 1 Flashcards
A ______ language is a programming language designed to be easy for humans to read and write.
high-level
A ________ language is a programming language designed to be easy for a computer to run.
low-level
______ is a property of a program that can run on more than one kind of computer.
Portability
An _______ is a program that reads another program and executes it.
Interpreter
A ______ is a set of instructions that specifies a computation.
Program
A _______ is characters displayed by the interpreter to indicate that it is ready to take input from the user.
Prompt
A ________ is an instruction that causes the python interpreter to display a value on the screen.
print statement
An ______ is a special symbol representing simple computation.
operator
A _____ is a basic unit of data that a program manipulates.
value
A _____ is a category of values such as int, str, float, bool, etc.
type
_______ is an operator written by ______ that divides two numbers and rounds down to an integer.
floor division, //
_______ is an operator written by ______ that works on integers and returns the remainder when one number is divided by another.
modulus operator, %
An ________ is a statement that assigns a value to a variable.
assignment
A _______ is a graphical representation of a set of variables and the values they refer to.
state diagram
A ________ is used to parse a program and cannot be if, def, while.
keyword
An _______ is one of the values on which an operator operates.
operand
An _______ is a combination of variables, operators and values that represents a single result.
expression
_________ is a way of using the python interpreter by typing code at the prompt.
interactive mode
The operators ______ and ______ don’t change based on the number of them at exist. Ex. 2 _ _ _ _ _ 2 gives the same result as 2 _ 2
- +
- -
A leading zero on a number will give ________. Ex. 09
error
variables ______ begin with a number and ______ uppercase letters.
cannot, conventionally don’t use
_________ recognize the structure of a program and cannot be used as variable names.
keywords.
An _________ is a combination of values, variables, and operators.
expression
A __________ is a unit of code that has an effect, like creating a variable or displaying a value. Generally does not have values.
statement
The only mathematical operators that can be used on strings are _______ and _______.
- +
- *
________ begin with # and have no bearing on the code that runs.
comments
A _____ can be added to the end of a statement so a new statement can be written on the same line.
- ;
A period at the end of a statement gives _______.
error
Two values ______ be multiplied without an operator between them.
ex. xy
cannot
The str.method for print is given by: _____________.
print(“test {}”.format(1))
Scientific notation using the str.format is given by _________. ______ add a positive or negative.
1) {:.#e}
don’t
When int is used to convert from float to int it __________.
chops off the decimal
To convert between integer, floating number, and string use _______, _________, ________.
int(), float(), str()
A _______ is a file containing a collection of related functions. Ex. check, math
module
_________ is used to access a function from a module and the format is ____________.
dot notation
module.function
A variable created inside a function is ________ and exists _______ the function. Parameters are also _______.
local
only inside
local
________ functions perform an action but don’t return a value. __________ functions return results.
void
fruitful