MIT 6.0001 - Introduction to Computer Science and Programming in Python
Cards in this deck
(20 cards)Preview terms and definitions before starting your study session.
- 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.
int, float, bool, None). Non-scalar data types have internal structure and can be indexed or iterated over (e.g., str, list, tuple, dict).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.if, elif, else)if x > 0:
print("Positive")
elif x < 0:
print("Negative")
else:
print("Zero")True.while Loop vs. for Loopwhileloop: Unbounded iteration. Continues executing code as long as a specified boolean expression remainsTrue.forloop: Bounded iteration. Iterates over a predefined sequence or range (e.g.,for i in range(n):).
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.Related Flashcard Sets
Explore similar study materials created by the community
TypeScript - Modern JavaScript Development & Type Safety
Master TypeScript's powerful type system, generics, utility types, and configuration to build scalable, type-safe web applications with confidence.
Monash FIT9132 - Data Mining & Machine Learning Fundamentals
Master essential data mining techniques and machine learning algorithms from Monash FIT9132, spanning data preprocessing, classification, clustering, association rules, and evaluation metrics.
Biochemistry - Metabolic Pathways & Regulation
Master central metabolic pathways, bioenergetics, and hormonal regulation with high-yield flashcards designed for biochemistry, medical, and life science exams.
JLPT N2 - Advanced Japanese Grammar, Vocabulary & Kanji
Master upper-intermediate Japanese grammar patterns, high-frequency N2 kanji, and essential vocabulary with this comprehensive JLPT N2 prep deck. Elevate your fluency with detailed usage rules, example sentences, and formal nuances.