GE3151 - PSPP - TPFLASHCARDS
249 flashcards · Programming Languages · by Er.R. Sathish
Define: Body
The sequence of statements inside a function definition.
A program in a high-level language before being compiled
Source Code
A variable defined inside a function. A ____ can only be used inside its function.
Local Variable
Define: Keyword Argument
An argument that includes the name of the parameter as a "keyword."
The result of a function. If a function call is used as an expression, the ____ is the value of the expression.
Return Value
A conditional statement that appears in one of the branches of another conditional statement.
Nested Conditional
A function that returns a value.
Fruitful Function
A function that doesn't return a value.
Void Function
A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
Argument
A statement that executes a function. It consists of the function name followed by an argument list.
Function Call
A name used inside a function to refer to the value passed as an argument.
Parameter
The sequence of statements inside a function definition.
Body
One of the alternative sequences of statements in a conditional statement.
Branch
A graphical representation of a set of variables and the values they refer to.
State Diagram
To execute a program in a high-level language by translating it one line at a time.
interpret
The first line of a function definition.
Header
A value created by a function definition. The name of the function is a variable that refers to a ____.
Function Object
A statement that creates a new function, specifying its name, parameters, and the statements it executes.
Function Definition
A named sequence of statements that performs some useful operation. ____ may or may not take arguments and may or may not produce a result.
Function
Define: Function Definition
A statement that creates a new function, specifying its name, parameters, and the statements it executes.
Define: Function
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.
Define: 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.
Define: Concatenate
To join two operands end-to-end.
A programming language that is designed to be easy for a computer to execute; also called machine languageor assembly language.
Low-Level Language
A programming language like Python that is designed to be easy for humans to read and write.
High-Level Language
A requirement that should be satisfied by the function before it ends.
Postcondition
A requirement that should be satisfied by the caller before a function starts.
Precondition
A process for writing programs.
Development Plan
A description of how to use a function, including the name and descriptions of the arguments and return value.
Interface
An argument that includes the name of the parameter as a "keyword."
Keyword Argument
Define: Rules of Precedence
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.
Define: Evaluate
To simplify an expression by performing the operations in order to yield a single value.
Define: Expression
A combination of variables, operators, and values that represents a single result value.
Define: Floor Division
The operation that divides two numbers and chops off the fraction part.
Define: Operand
One of the values on which an operator operates.
Define: Operator
A special symbol that represents a simple computation like addition, multiplication, or string concatenation.
Define: Keyword
A reserved word that is used by the compiler to parse a program; you cannot use keywords like if, def, and while as variable names.
Define: State Diagram
A graphical representation of a set of variables and the values they refer to.
Define: Assignment
A statement that assigns a value to a variable.
Define: Statement
A section of code that represents a command or action. So far, the statements we have seen are assignments and print statements.
Define: Variable
A name that refers to a value.
Define: String
A type that represents sequences of characters.
Define: Floating-Point
A type that represents numbers with fractional parts.
Define: Type
A category of values. The types we have seen so far are integers (type int), floating point numbers (type float), and strings (type str).
Define: Value
One of the basic units of data, like a number or string, that a program manipulates.
A file that contains a collection of related functions and other definitions.
Module
Define: Print Statement
An instruction that causes the Python interpreter to display a value on the screen.
Define: Formal Language
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.
Define: Natural Language
Any one of the languages that people speak that evolved naturally.
Define: Semantic Error
An error in a program that makes it do something other than what the programmer intended.
Define: Semantics
The meaning of a program.
Define: Exception
An error that is detected while the program is running.
Define: Syntax Error
An error in a program that makes it impossible to parse (and therefore impossible to interpret).
Define: Syntax
The structure of a program.
The process of calling the function that is currently executing.
Recursion
Define: Debugging
The process of finding and removing any of the three kinds of programming errors.
Define: Bug
An error in a program.
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
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
Using an expression as part of a larger expression, or a statement as part of a larger statement.
Composition
A conditional statement with a series of alternative branches.
Chained Conditional
One of the basic units of data, like a number or string, that a program manipulates.
Value
Define: Functional Programming Style
A style of program design in which the majority of functions are pure.
Define: Catch
To prevent an exception from terminating a program using the try and except statements.
Define: Path
A string that identifes a file.
Define: Directory
A named collection of files, also called a folder.
Define: Text File
A sequence of characters stored in permanent storage like a hard drive.
Define: Format Sequence
A sequence of characters in a format string, like %d, that specifies how a value should be formatted.
Define: Format String
A string, used with the format operator, that contains format sequences.
Define: Format Operator
An operator, %, that takes a format string and a tuple and generates a string that includes the elements of the tuple formatted as specified by the format string.
Define: Default Value
The value given to an optional parameter if no argument is provided.
Define: Tuple Assignment
An assignment with a sequence on the right side and a tuple of variables on the left. The right side is evaluated and then its elements are assigned to the variables on the left.
Define: Tuple
An immutable sequence of elements.
Define: Declaration
A statement like global that tells the interpreter something about a variable.
Define: Flag
A boolean variable used to indicate whether a condition is true.
Define: Global Variable
A variable defined outside a function. Global variables can be accessed from any function.
Define: Histogram
A set of counters.
Define: Item (dictionary)
Another name for a key-value pair.
Define: Dictionary
A mapping from a set of keys to their corresponding values.
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
The boolean expression in a conditional statement that determines which branch is executed.
Condition
A statement that controls the flow of execution depending on some condition.
Contitional Statement
One of the operators that combines boolean expressions: and, or, and not.
Logical Operator
Define: Aliasing
A circumstance where two or more variables refer to the same object.
Define: Value (dictionary)
An object that appears in a dictionary as the second part of a key-value pair. This is more specific than our previous use of the word "value."
Define: Reference
The association between a variable and its value.
Define: Equivalent
Having the same value.
Define: Augmented Assignment
A statement that updates the value of a variable using an operator like +=.
Define: List Traversal
The sequential accessing of each element in a list.
Define: Nested List
A list that is an element of another list.
Define: Index (list)
An integer value that indicates an element in a list.
Define: Element
One of the values in a list (or other sequence), also called items.
Define: List
A sequence of values.
Define: Problem Recognition
A way of solving a problem by expressing it as an instance of a previously-solved problem.
Define: Invocation
A statement that calls a method.
Define: Counter
A variable used to count something, usually initialized to zero and then incremented.
Define: Search
A pattern of traversal that stops when it finds what it is looking for.
The process of formulating a problem, finding a solution, and expressing the solution.
Problem Solving
Define: Immutable
The property of a sequence whose items cannot be assigned.
Define: Empty String
A string with no characters and length 0, represented by two quotation marks.