Flashcard Deck · 20 cards · Public

MIT 6.0001 - Introduction to Computer Science and Programming in Python

Master core computer science principles and Python programming with this high-yield deck based on MIT 6.0001, covering control flow, recursion, algorithmic complexity, and object-oriented design.

Cards in this deck

(20 cards)

Preview terms and definitions before starting your study session.

#1
Term
Functions and Scope Environments
Definition
Calling a function creates a new local frame/environment. Variables declared inside a function exist only within its local scope and are destroyed upon returning, preventing unintentional side effects in the global scope.
#2
Term
Tuples vs. Lists
Definition
  • Tuple: An ordered, immutable sequence of elements enclosed in parentheses (). Cannot be modified after creation.
  • List: An ordered, mutable sequence of elements enclosed in brackets []. Supports insertion, deletion, and reassignment.
#3
Term
Scalar vs. Non-Scalar Data Types
Definition
Scalar data types represent indivisible, atomic values in Python (e.g., int, float, bool, None). Non-scalar data types have internal structure and can be indexed or iterated over (e.g., str, list, tuple, dict).
#4
Term
Variable Assignment and Binding
Definition
In Python, variable assignment (e.g., x = 5) does not store a value inside a variable. Instead, it binds the variable name x to an object in memory containing the value 5.
#5
Term
Conditional Control Flow (if, elif, else)
Definition
Executes specific blocks of code based on boolean evaluation:
python6 lines
if x > 0:
    print("Positive")
elif x < 0:
    print("Negative")
else:
    print("Zero")
Evaluation stops at the first branch whose condition evaluates to True.
#6
Term
while Loop vs. for Loop
Definition
  • while loop: Unbounded iteration. Continues executing code as long as a specified boolean expression remains True.
  • for loop: Bounded iteration. Iterates over a predefined sequence or range (e.g., for i in range(n):).
#7
Term
Floating-Point Imprecision
Definition
Computers represent float values using binary fractions. Many base-10 decimals (like 0.1) cannot be stored exactly in binary, leading to minor rounding errors: 0.1 + 0.2 == 0.3 evaluates to False in Python.
#8
Term
Bisection Search (Binary Search)
Definition
An efficient algorithm for finding a target value within a sorted list by repeatedly halving the search space. Its time complexity is , making it vastly superior to linear search for large datasets.
Showing 8 of 20 cards in this deck.
Study All Now