What is a Python variable, and what does = do?
A variable is a name associated with a value; Python’s = assigns a value to a name rather than testing mathematical equality.
Study 2 Programming Foundations for Data Analysis with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a Python variable, and what does = do?
A variable is a name associated with a value; Python’s = assigns a value to a name rather than testing mathematical equality.
When does Python determine a value’s type?
Python determines a value’s type at runtime. Converting numeric text with float(), for example, can make it usable as a decimal number.
What is a Python list suited for?
A list is an ordered, changeable sequence, useful for storing observations or measurements.
How do if, elif, and else divide conditional cases?
Use if for the first test, elif for additional possibilities, and else for the remaining case. Each controls its indented block.
How does a for loop process a collection?
A for loop processes items in a collection in turn; its loop variable takes the next item on each pass.
What are the roles of def, parameters, and return in a function?
A function is a named, reusable block of code. Define it with def, use parameters for inputs, and return to send a result to the caller.
How does a tuple differ from a list?
A tuple is an ordered, unchangeable sequence, useful for a fixed group of related values.
How can a dictionary safely handle a possibly missing key?
A dictionary stores key–value pairs. Its get() method can return a default value when a key is absent, avoiding a KeyError.
When is a set useful?
A set stores distinct values, making it useful when duplicates are not needed.
What index refers to the first item in a Python list?
Python list indexes start at zero, so readings[0] refers to the first item.
Which Python operators combine or reverse logical tests?
Use and, or, and not to combine or reverse logical tests in a condition.
When does a while loop repeat?
A while loop repeats its code as long as its condition remains true.
Learn how computers encode numbers, text, images, and sound as binary data, along with the limits and trade-offs of digital representation.
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
A medium-difficulty assessment of algorithm specifications, searching, sorting, iteration, recursion, invariants, termination, and correctness proofs. Questions progress from direct application to integrated reasoning.
A progressive guide to measuring algorithmic time and memory requirements, interpreting asymptotic bounds, analyzing common code patterns, and balancing performance trade-offs.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
A structured introduction to the logic, sets, relations, functions, and proof methods that form the mathematical foundation of computer science.
A focused set of 14 flashcards covering how computer hardware, software, operating systems, memory, storage, processes, and networks cooperate as an integrated system.
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.
A structured guide to designing, evaluating, and governing computing systems that are secure, private, correct, reliable, fair, accessible, and socially responsible.