1/41
Vocabulary practice flashcards covering basic Python data structures, programming statements, control loops, logical operators, and function concepts.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Data Structures
Ways of organizing data so it can be accessed efficiently, acting as containers for organizing or grouping data.
List
An ordered, changeable collection that allows duplicate members and can contain different data types.
Tuple
An ordered collection of Python objects that is immutable (unchangeable) and allows duplicate members.
Set
An unordered and unindexed collection that does not allow duplicates, useful for membership testing and eliminating duplicates.
Dictionary
An ordered (as of Python 3.7) and changeable collection of key:value pairs with no duplicate keys.
Indentation
The mechanism in Python that declares a block of code, grouping statements at the same indentation level into the same block.
if Statement
A decision statement that tests a condition and executes its indented block if the condition is True.
if-else Statement
A decision statement that runs the if block when the condition is True; otherwise, it runs the else block.
elif
A keyword used to check multiple conditions, executing the block belonging to the first condition that evaluates to True.
Nested if
An if statement placed inside another if statement.
for Loop
An iteration statement that repeats code once for each item in a sequence such as a list, tuple, dictionary, set, or string.
while Loop
An iteration statement that repeats code as long as its condition remains True.
break
A control statement that immediately stops execution of the loop before all items are processed.
continue
A control statement that stops the current iteration of a loop and moves to the next iteration.
range()
A function that produces a sequence of numbers, starting at 0 by default, increasing by 1 by default, and stopping before the specified ending number.
for-else Construct
A control construct where the else block executes when the for loop finishes normally, but not when stopped by a break statement.
Nested Loop
A loop placed inside another loop, where the inner loop runs once for each iteration of the outer loop.
pass
A placeholder statement that allows a loop, function, or block to contain no action yet.
do-while Concept
A loop structure that executes code at least once before checking its condition, emulated in Python using while True together with break.
Ternary / Conditional Operator
A one-line expression testing a condition and returning one value if True and another if False (e.g., a if condition else b).
and Operator
A logical operator that returns True only when both conditions are True.
or Operator
A logical operator that returns True when at least one condition is True.
not Operator
A logical operator that reverses a Boolean result.
Function
A block of code that executes when called, accepting passed data and returning data as a result.
def
The keyword used to define a function in Python.
Parameter
The variable written in a function definition that receives a value when the function is called.
Argument
The information or value supplied and passed into a function call.
*args
A feature allowing a function to accept an arbitrary number of positional arguments.
Keyword Arguments
Arguments passed using parameter names so that the order of the arguments does not matter.
**kwargs
A feature allowing a function to accept an arbitrary number of keyword arguments.
Default Parameter Value
A value used for a parameter when the caller does not provide an argument for it.
return
A statement used to send a result back from a function to the code that called it.
Recursion
A programming technique where a function calls itself, reducing a larger problem into smaller calls.
Scope
The region of a program where a variable can be accessed.
Local Scope
Scope of a variable created inside a function, accessible only within that function's scope.
Global Scope
Scope of a variable defined outside functions, belonging to the broader script execution area.
nonlocal
A keyword used in nested functions when referring to a variable from an enclosing (non-global) scope.
random Module
Python's built-in module used to generate random numbers.
Lambda Function
A small anonymous function that can take any number of arguments but has only one expression.
Python Data Structure Comparison Table
A summary table comparing List, Tuple, Set, and Dictionary based on ordering, changeability, duplicate support, and main characteristics.
Logical Operators Truth Table
A truth table showing the boolean outcomes of 'A and B' and 'A or B' across all True/False combinations of inputs A and B.
CCS 1400 Exam Cheat Sheet
A reference table outlining key Python terms, loop control statements, function parameters, variable scopes, and data structures for quick exam preparation.