COMPSCI 202 PT 1

    Master this deck with 86 terms through effective study methods.

    No description available

    Created by @emmmmroy

    What is a program?

    Consists of instructions executed sequentially.

    What does input refer to in programming?

    Data received from various sources like files or keyboards.

    What is the purpose of a process in a program?

    Performs computations on input data.

    What does output mean in programming?

    Data sent to a file, screen, or network.

    What are variables used for?

    To refer to data within a program.

    What is computational thinking?

    Creating instructions to solve problems.

    What defines an algorithm?

    A sequence of instructions that solves a problem.

    What is the function of the Python interpreter?

    Executes code written in Python.

    What distinguishes an interactive interpreter?

    Allows execution of one line of code at a time.

    What is meant by code in programming?

    Textual representation of a program.

    What is a statement in programming?

    An instruction within a program.

    What does the print() function do?

    Displays values of variables or expressions.

    What is a string?

    Text enclosed in quotes.

    What is the purpose of the newline character?

    Moves output to the next line.

    What is an escape sequence?

    A string with a special meaning starting with a backslash.

    What does the input() function do?

    Reads input from a user.

    What is a syntax error?

    A mistake violating programming language rules.

    What is a runtime error?

    Occurs when a program attempts an impossible operation.

    What is a logic error?

    A flaw in the program's logic.

    What is an integrated development environment (IDE)?

    Software combining a text editor and interpreter.

    What does syntax highlighting do?

    Uses colors to differentiate code elements.

    What is a command-line argument?

    A value entered after the program name in a command line.

    What are bits?

    Binary digits represented as 0s and 1s.

    What is the role of a processor?

    Executes instructions and performs operations.

    What is a byte?

    A unit consisting of 8 bits.

    What does Moore's Law state?

    IC capacity doubles approximately every 18 months.

    What are high-level languages?

    Languages that support programming with formulas or algorithms.

    What is the function of a compiler?

    Translates high-level language programs into executable programs.

    What is a script?

    Executed by an interpreter.

    What defines Python?

    Created by Guido van Rossum in the late 1980s.

    What does backward compatible mean?

    Older versions cannot run on newer interpreters.

    What is open-source?

    Community-driven language development.

    What is whitespace?

    Blank space or newline in code.

    What is a variable?

    Holds a value and has a name.

    What is an assignment statement?

    Assigns a value to a variable.

    What does incrementing mean?

    Increasing a variable's value by 1.

    What is an identifier?

    A name that starts with a letter or underscore.

    How does case sensitivity affect Python?

    Uppercase and lowercase letters are treated differently.

    What are reserved words?

    Keywords that cannot be used as names.

    What is PEP 8?

    Guidelines for writing consistent Python code.

    What is an object in Python?

    Represents a value created by the interpreter.

    What is garbage collection?

    Automatic deletion of unused objects.

    What is name binding?

    Associating names with interpreter objects.

    What is a value?

    A specific data representation like '20' or 'abcdef'.

    What is type?

    Describes the kind of object, like integer or string.

    What is identity in Python?

    A unique identifier for an object.

    What does type() do?

    Returns the type of an object.

    What does mutability indicate?

    Whether an object's value can change.

    What are immutable types?

    Types whose values cannot be changed.

    What does id() return?

    The identity value of an object.

    What is a floating-point number?

    A real number like 98.6 or -666.667.

    What is the float data type?

    Used for representing floating-point numbers.

    What is a floating-point literal?

    Written with a fractional part, even if 0.

    What is scientific notation in Python?

    Uses 'e' for powers of 10.

    What causes an OverflowError?

    Assigning a value outside the floating-point range.

    What is overflow?

    When a value exceeds memory limits.

    What is an expression?

    Combines items to evaluate to a value.

    What is a literal?

    A specific value in code.

    What is an operator?

    Symbol that performs calculations.

    What does the addition operator do?

    Performs addition between two values.

    What does the subtraction operator do?

    Calculates the difference between two values.

    What is negation in Python?

    Using - to indicate a negative value.

    What does the multiplication operator do?

    Calculates the product of two values.

    What does the division operator do?

    Calculates the quotient of two values.

    What does the exponent operator do?

    Raises a number to the power of another.

    What does evaluates mean in programming?

    Replaces an expression with its resulting value.

    What are precedence rules?

    Order of operations in expressions.

    What is unary minus?

    Using - to indicate a negative number.

    What are compound operators?

    Shorthand for updating variable values.

    What does the modulo operator do?

    Calculates the remainder of a division.

    What is a script in Python?

    A file containing Python program code.

    What is a module?

    A file with Python code for reuse.

    What does the import statement do?

    Makes a module available for use.

    What is dot notation?

    Accessing module objects using a dot.

    What is __name__ used for?

    Determines if a file is executed or imported.

    What is the math module?

    Provides advanced math operations.

    What is a function?

    A list of statements executed by name.

    What is a function call?

    Invoking a function by its name.

    What is an argument in Python?

    An item passed to a function.

    What does the random module do?

    Provides methods for generating random values.

    What does random() return?

    A random float between 0 and 1.

    What does randrange() do?

    Generates random integers within a range.

    What does randint(min, max) return?

    A random integer between min and max inclusive.

    What does randrange(min, max) return?

    A random integer between min and max - 1.

    What is a seed in random number generation?

    Initial value based on current time for randomness.

    What is Unicode?

    Represents characters as unique numbers.