GE3151 - PSPP - TPFLASHCARDS

249 flashcards · Programming Languages · by Er.R. Sathish

  1. Define: Body

    The sequence of statements inside a function definition.

  2. A program in a high-level language before being compiled

    Source Code

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

    Local Variable

  4. Define: Keyword Argument

    An argument that includes the name of the parameter as a "keyword."

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

    Return Value

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

    Nested Conditional

  7. A function that returns a value.

    Fruitful Function

  8. A function that doesn't return a value.

    Void Function

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

    Argument

  10. A statement that executes a function. It consists of the function name followed by an argument list.

    Function Call

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

    Parameter

  12. The sequence of statements inside a function definition.

    Body

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

    Branch

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

    State Diagram

  15. To execute a program in a high-level language by translating it one line at a time.

    interpret

  16. The first line of a function definition.

    Header

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

    Function Object

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

    Function Definition

  19. 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

  20. Define: Function Definition

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

  21. 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.

  22. 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.

  23. Define: Concatenate

    To join two operands end-to-end.

  24. A programming language that is designed to be easy for a computer to execute; also called machine languageor assembly language.

    Low-Level Language

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

    High-Level Language

  26. A requirement that should be satisfied by the function before it ends.

    Postcondition

  27. A requirement that should be satisfied by the caller before a function starts.

    Precondition

  28. A process for writing programs.

    Development Plan

  29. A description of how to use a function, including the name and descriptions of the arguments and return value.

    Interface

  30. An argument that includes the name of the parameter as a "keyword."

    Keyword Argument

  31. Define: Rules of Precedence

    The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.

  32. Define: Evaluate

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

  33. Define: Expression

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

  34. Define: Floor Division

    The operation that divides two numbers and chops off the fraction part.

  35. Define: Operand

    One of the values on which an operator operates.

  36. Define: Operator

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

  37. 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.

  38. Define: State Diagram

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

  39. Define: Assignment

    A statement that assigns a value to a variable.

  40. Define: Statement

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

  41. Define: Variable

    A name that refers to a value.

  42. Define: String

    A type that represents sequences of characters.

  43. Define: Floating-Point

    A type that represents numbers with fractional parts.

  44. 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).

  45. Define: Value

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

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

    Module

  47. Define: Print Statement

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

  48. 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.

  49. Define: Natural Language

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

  50. Define: Semantic Error

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

  51. Define: Semantics

    The meaning of a program.

  52. Define: Exception

    An error that is detected while the program is running.

  53. Define: Syntax Error

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

  54. Define: Syntax

    The structure of a program.

  55. The process of calling the function that is currently executing.

    Recursion

  56. Define: Debugging

    The process of finding and removing any of the three kinds of programming errors.

  57. Define: Bug

    An error in a program.

  58. 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

  59. 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

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

    Composition

  61. A conditional statement with a series of alternative branches.

    Chained Conditional

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

    Value

  63. Define: Functional Programming Style

    A style of program design in which the majority of functions are pure.

  64. Define: Catch

    To prevent an exception from terminating a program using the try and except statements.

  65. Define: Path

    A string that identifes a file.

  66. Define: Directory

    A named collection of files, also called a folder.

  67. Define: Text File

    A sequence of characters stored in permanent storage like a hard drive.

  68. Define: Format Sequence

    A sequence of characters in a format string, like %d, that specifies how a value should be formatted.

  69. Define: Format String

    A string, used with the format operator, that contains format sequences.

  70. 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.

  71. Define: Default Value

    The value given to an optional parameter if no argument is provided.

  72. 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.

  73. Define: Tuple

    An immutable sequence of elements.

  74. Define: Declaration

    A statement like global that tells the interpreter something about a variable.

  75. Define: Flag

    A boolean variable used to indicate whether a condition is true.

  76. Define: Global Variable

    A variable defined outside a function. Global variables can be accessed from any function.

  77. Define: Histogram

    A set of counters.

  78. Define: Item (dictionary)

    Another name for a key-value pair.

  79. Define: Dictionary

    A mapping from a set of keys to their corresponding values.

  80. 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

  81. The boolean expression in a conditional statement that determines which branch is executed.

    Condition

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

    Contitional Statement

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

    Logical Operator

  84. Define: Aliasing

    A circumstance where two or more variables refer to the same object.

  85. 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."

  86. Define: Reference

    The association between a variable and its value.

  87. Define: Equivalent

    Having the same value.

  88. Define: Augmented Assignment

    A statement that updates the value of a variable using an operator like +=.

  89. Define: List Traversal

    The sequential accessing of each element in a list.

  90. Define: Nested List

    A list that is an element of another list.

  91. Define: Index (list)

    An integer value that indicates an element in a list.

  92. Define: Element

    One of the values in a list (or other sequence), also called items.

  93. Define: List

    A sequence of values.

  94. Define: Problem Recognition

    A way of solving a problem by expressing it as an instance of a previously-solved problem.

  95. Define: Invocation

    A statement that calls a method.

  96. Define: Counter

    A variable used to count something, usually initialized to zero and then incremented.

  97. Define: Search

    A pattern of traversal that stops when it finds what it is looking for.

  98. The process of formulating a problem, finding a solution, and expressing the solution.

    Problem Solving

  99. Define: Immutable

    The property of a sequence whose items cannot be assigned.

  100. Define: Empty String

    A string with no characters and length 0, represented by two quotation marks.