AP CSP Daily Practice

AP CSP Day 30: Computing Innovations Review

Key Concepts Computing innovations include hardware, software, and system-level advances that create new capabilities or significantly change existing ones. The AP CSP exam expects students to evaluate both the intended...

AP CSP Day 30: Computing Innovations Review

Key Concepts Computing innovations include hardware, software, and system-level advances that create new capabilities or significantly change existing ones. The AP CSP exam expects students to evaluate both the intended...

AP CSP Day 60: Side Effects And Mutation

AP CSP Day 60: Side Effects And Mutation

Key Concepts Functional programming style minimizes side effects by designing procedures that always return a value and never modify external state, making programs easier to reason about and test. When...

AP CSP Day 60: Side Effects And Mutation

Key Concepts Functional programming style minimizes side effects by designing procedures that always return a value and never modify external state, making programs easier to reason about and test. When...

AP CSP Day 59: Procedural Abstraction

AP CSP Day 59: Procedural Abstraction

Key Concepts Decomposition is the process of breaking a complex problem into smaller subproblems, each solved by a separate procedure. A well-decomposed program has procedures that are independent enough to...

AP CSP Day 59: Procedural Abstraction

Key Concepts Decomposition is the process of breaking a complex problem into smaller subproblems, each solved by a separate procedure. A well-decomposed program has procedures that are independent enough to...

AP CSP Day 58: Procedures And Parameters

AP CSP Day 58: Procedures And Parameters

Key Concepts Higher-order procedure design involves writing a general procedure that accepts another procedure or a condition as a parameter, enabling flexible reuse across different scenarios. On the AP CSP...

AP CSP Day 58: Procedures And Parameters

Key Concepts Higher-order procedure design involves writing a general procedure that accepts another procedure or a condition as a parameter, enabling flexible reuse across different scenarios. On the AP CSP...

AP CSP Day 57: List Traversal And Filtering

AP CSP Day 57: List Traversal And Filtering

Key Concepts In-place mutation during traversal is a subtle bug where a loop removes or inserts elements into the list being iterated, causing the traversal to skip elements or process...

AP CSP Day 57: List Traversal And Filtering

Key Concepts In-place mutation during traversal is a subtle bug where a loop removes or inserts elements into the list being iterated, causing the traversal to skip elements or process...

AP CSP Day 56: Iteration Patterns

AP CSP Day 56: Iteration Patterns

Key Concepts Loop invariants are conditions that remain true before, during, and after every iteration of a loop and can be used to prove a loop is correct. While the...

AP CSP Day 56: Iteration Patterns

Key Concepts Loop invariants are conditions that remain true before, during, and after every iteration of a loop and can be used to prove a loop is correct. While the...

AP CSP Day 55: Conditionals

AP CSP Day 55: Conditionals

Key Concepts Reachable versus unreachable code is a conditional logic issue where a condition can never be true given the constraints established by earlier conditions. For example, after an IF...

AP CSP Day 55: Conditionals

Key Concepts Reachable versus unreachable code is a conditional logic issue where a condition can never be true given the constraints established by earlier conditions. For example, after an IF...

AP CSP Day 54: Boolean Logic

AP CSP Day 54: Boolean Logic

Key Concepts Short-circuit evaluation means that in an AND expression, if the first operand is false, the second operand is never evaluated because the result is already determined to be...

AP CSP Day 54: Boolean Logic

Key Concepts Short-circuit evaluation means that in an AND expression, if the first operand is false, the second operand is never evaluated because the result is already determined to be...

AP CSP Day 53: Variables And Assignment

AP CSP Day 53: Variables And Assignment

Key Concepts Complex variable tracing involves code where multiple variables reference each other in sequence, such as a series of three assignments where the final value of each variable depends...

AP CSP Day 53: Variables And Assignment

Key Concepts Complex variable tracing involves code where multiple variables reference each other in sequence, such as a series of three assignments where the final value of each variable depends...

AP CSP Day 52: Privacy PII And Ethical Computing

AP CSP Day 52: Privacy PII And Ethical Computing

Key Concepts The right to be forgotten (data erasure) conflicts with legitimate interests in maintaining accurate historical records and enabling fraud detection using transaction history. Digital permanence means that data...

AP CSP Day 52: Privacy PII And Ethical Computing

Key Concepts The right to be forgotten (data erasure) conflicts with legitimate interests in maintaining accurate historical records and enabling fraud detection using transaction history. Digital permanence means that data...

AP CSP Day 51: Encryption And Security Tradeoffs

AP CSP Day 51: Encryption And Security Tradeoffs

Key Concepts The key exchange problem in symmetric encryption is that both parties must share the same secret key, but transmitting it over an insecure channel risks interception. Public key...

AP CSP Day 51: Encryption And Security Tradeoffs

Key Concepts The key exchange problem in symmetric encryption is that both parties must share the same secret key, but transmitting it over an insecure channel risks interception. Public key...

AP CSP Day 50: Internet Protocols

AP CSP Day 50: Internet Protocols

Key Concepts The layered model of internet protocols assigns each layer a specific responsibility: the application layer (HTTP/HTTPS/DNS) handles user-facing services, the transport layer (TCP/UDP) manages reliable or fast delivery,...

AP CSP Day 50: Internet Protocols

Key Concepts The layered model of internet protocols assigns each layer a specific responsibility: the application layer (HTTP/HTTPS/DNS) handles user-facing services, the transport layer (TCP/UDP) manages reliable or fast delivery,...

AP CSP Day 49: Fault Tolerance And Redundancy

AP CSP Day 49: Fault Tolerance And Redundancy

Key Concepts Calculating fault tolerance precisely requires determining the minimum number of simultaneous link failures that can disconnect any node from the rest of the network. A node with only...

AP CSP Day 49: Fault Tolerance And Redundancy

Key Concepts Calculating fault tolerance precisely requires determining the minimum number of simultaneous link failures that can disconnect any node from the rest of the network. A node with only...

AP CSP Day 48: Packet Switching

AP CSP Day 48: Packet Switching

Key Concepts Packet headers contain routing information including source address, destination address, and sequence number, allowing routers to forward packets correctly and enabling the destination to reassemble them in order....

AP CSP Day 48: Packet Switching

Key Concepts Packet headers contain routing information including source address, destination address, and sequence number, allowing routers to forward packets correctly and enabling the destination to reassemble them in order....

AP CSP Day 47: Internet Structure

AP CSP Day 47: Internet Structure

Key Concepts The hierarchical structure of the internet includes edge networks (homes, businesses), regional networks, and backbone networks connected by high-capacity links. Routing tables stored in routers determine the next...

AP CSP Day 47: Internet Structure

Key Concepts The hierarchical structure of the internet includes edge networks (homes, businesses), regional networks, and backbone networks connected by high-capacity links. Routing tables stored in routers determine the next...

AP CSP Day 46: Data Compression

AP CSP Day 46: Data Compression

Key Concepts Run-length encoding (RLE) is a lossless compression method that replaces consecutive repeated values with a count and the value, such as encoding 'AAAABBB' as '4A3B'. RLE is highly...

AP CSP Day 46: Data Compression

Key Concepts Run-length encoding (RLE) is a lossless compression method that replaces consecutive repeated values with a count and the value, such as encoding 'AAAABBB' as '4A3B'. RLE is highly...

AP CSP Day 45: Metadata

AP CSP Day 45: Metadata

Key Concepts Metadata aggregation creates privacy risks more serious than any single metadata field in isolation: combining call duration logs, cell tower location data, and contact frequency can reveal a...

AP CSP Day 45: Metadata

Key Concepts Metadata aggregation creates privacy risks more serious than any single metadata field in isolation: combining call duration logs, cell tower location data, and contact frequency can reveal a...

AP CSP Day 44: Bias In Data And Algorithms

AP CSP Day 44: Bias In Data And Algorithms

Key Concepts Feedback loops in biased algorithms amplify initial inequities over time: a predictive policing algorithm trained on historically biased arrest data directs more patrols to certain areas, generating more...

AP CSP Day 44: Bias In Data And Algorithms

Key Concepts Feedback loops in biased algorithms amplify initial inequities over time: a predictive policing algorithm trained on historically biased arrest data directs more patrols to certain areas, generating more...

AP CSP Day 43: Correlation vs. Causation

AP CSP Day 43: Correlation vs. Causation

Key Concepts Confounding variables are hidden factors that causally affect both variables in a correlation, creating the appearance of a direct relationship that does not exist. For example, ice cream...

AP CSP Day 43: Correlation vs. Causation

Key Concepts Confounding variables are hidden factors that causally affect both variables in a correlation, creating the appearance of a direct relationship that does not exist. For example, ice cream...

AP CSP Day 42: Data Visualization And Limitations

AP CSP Day 42: Data Visualization And Limitations

Key Concepts A truncated y-axis on a bar chart starts the axis above zero, making small differences appear much larger than they are. A misleading scatter plot may show a...

AP CSP Day 42: Data Visualization And Limitations

Key Concepts A truncated y-axis on a bar chart starts the axis above zero, making small differences appear much larger than they are. A misleading scatter plot may show a...

AP CSP Day 41: Data Collection And Cleaning

AP CSP Day 41: Data Collection And Cleaning

Key Concepts Survivorship bias is a data collection error where only successful or surviving cases are included, making outcomes appear better than they actually are. Self-selection bias occurs when participants...

AP CSP Day 41: Data Collection And Cleaning

Key Concepts Survivorship bias is a data collection error where only successful or surviving cases are included, making outcomes appear better than they actually are. Self-selection bias occurs when participants...

AP CSP Day 40: Side Effects And Mutation

AP CSP Day 40: Side Effects And Mutation

Key Concepts Unintended mutation occurs when a procedure modifies a shared list as a side effect, changing data that other parts of the program expected to remain unchanged. This is...

AP CSP Day 40: Side Effects And Mutation

Key Concepts Unintended mutation occurs when a procedure modifies a shared list as a side effect, changing data that other parts of the program expected to remain unchanged. This is...

AP CSP Day 39: Procedural Abstraction

AP CSP Day 39: Procedural Abstraction

Key Concepts A well-designed procedure should do exactly one thing described by its name, taking all necessary inputs as parameters rather than relying on global variables. Procedures that silently depend...

AP CSP Day 39: Procedural Abstraction

Key Concepts A well-designed procedure should do exactly one thing described by its name, taking all necessary inputs as parameters rather than relying on global variables. Procedures that silently depend...

AP CSP Day 38: Procedures And Parameters

AP CSP Day 38: Procedures And Parameters

Key Concepts Procedure call errors include passing arguments in the wrong order, passing the wrong number of arguments, or misunderstanding which variable receives a return value. When a procedure has...

AP CSP Day 38: Procedures And Parameters

Key Concepts Procedure call errors include passing arguments in the wrong order, passing the wrong number of arguments, or misunderstanding which variable receives a return value. When a procedure has...

AP CSP Day 37: Accumulator Pattern

AP CSP Day 37: Accumulator Pattern

Key Concepts Accumulator initialization errors cause systematic incorrect results: initializing a sum accumulator to 1 instead of 0 adds 1 to every computed total, and initializing a product accumulator to...

AP CSP Day 37: Accumulator Pattern

Key Concepts Accumulator initialization errors cause systematic incorrect results: initializing a sum accumulator to 1 instead of 0 adds 1 to every computed total, and initializing a product accumulator to...

AP CSP Day 36: List Traversal And Filtering

AP CSP Day 36: List Traversal And Filtering

Key Concepts Filtering algorithms can fail silently when the condition is inverted, collecting the wrong elements without producing an obvious error. A filter that should collect values greater than a...

AP CSP Day 36: List Traversal And Filtering

Key Concepts Filtering algorithms can fail silently when the condition is inverted, collecting the wrong elements without producing an obvious error. A filter that should collect values greater than a...

AP CSP Day 35: Lists As Data Abstraction

AP CSP Day 35: Lists As Data Abstraction

Key Concepts List index errors are among the most common bugs in list-based algorithms, occurring when code accesses an index that does not exist in the list. In AP CSP...

AP CSP Day 35: Lists As Data Abstraction

Key Concepts List index errors are among the most common bugs in list-based algorithms, occurring when code accesses an index that does not exist in the list. In AP CSP...

AP CSP Day 34: Iteration Patterns

AP CSP Day 34: Iteration Patterns

Key Concepts Loop termination errors occur when a REPEAT UNTIL condition is written incorrectly, causing infinite loops or premature exits. An off-by-one error in iteration count produces a result that...

AP CSP Day 34: Iteration Patterns

Key Concepts Loop termination errors occur when a REPEAT UNTIL condition is written incorrectly, causing infinite loops or premature exits. An off-by-one error in iteration count produces a result that...

AP CSP Day 33: Conditionals

AP CSP Day 33: Conditionals

Key Concepts Conditional logic errors include using the wrong comparison operator, inverting a condition, or placing a condition in the wrong branch of an IF/ELSE structure. A common bug is...

AP CSP Day 33: Conditionals

Key Concepts Conditional logic errors include using the wrong comparison operator, inverting a condition, or placing a condition in the wrong branch of an IF/ELSE structure. A common bug is...

AP CSP Day 32: Boolean Logic

AP CSP Day 32: Boolean Logic

Key Concepts Boolean logic errors often arise from confusion between AND and OR, particularly in guard conditions that should exclude invalid inputs. A condition written as (age > 0 AND...

AP CSP Day 32: Boolean Logic

Key Concepts Boolean logic errors often arise from confusion between AND and OR, particularly in guard conditions that should exclude invalid inputs. A condition written as (age > 0 AND...

AP CSP Day 31: Variables And Assignment

AP CSP Day 31: Variables And Assignment

Key Concepts Advanced variable tracing requires identifying errors in assignment sequences where a programmer uses a variable before it has been assigned, or accidentally overwrites a value needed later. Swap...

AP CSP Day 31: Variables And Assignment

Key Concepts Advanced variable tracing requires identifying errors in assignment sequences where a programmer uses a variable before it has been assigned, or accidentally overwrites a value needed later. Swap...

AP CSP Day 29: Fault Tolerance And Redundancy

AP CSP Day 29: Fault Tolerance And Redundancy

Key Concepts Network redundancy is measured by counting how many connections must fail before some node becomes unreachable. A minimum cut is the smallest set of connections whose removal disconnects...

AP CSP Day 29: Fault Tolerance And Redundancy

Key Concepts Network redundancy is measured by counting how many connections must fail before some node becomes unreachable. A minimum cut is the smallest set of connections whose removal disconnects...

AP CSP Day 28: Procedures And Parameters

AP CSP Day 28: Procedures And Parameters

Key Concepts When a procedure is called, the argument values are copied into the corresponding parameters, which are local variables visible only inside the procedure. Changes to parameters inside a...

AP CSP Day 28: Procedures And Parameters

Key Concepts When a procedure is called, the argument values are copied into the corresponding parameters, which are local variables visible only inside the procedure. Changes to parameters inside a...

AP CSP Day 27: List Traversal And Filtering

AP CSP Day 27: List Traversal And Filtering

Key Concepts Two-list algorithms process elements from two lists in parallel, often comparing corresponding elements or building a result list by combining them. A search traversal uses a FOR EACH...

AP CSP Day 27: List Traversal And Filtering

Key Concepts Two-list algorithms process elements from two lists in parallel, often comparing corresponding elements or building a result list by combining them. A search traversal uses a FOR EACH...

AP CSP Day 26: Iteration Patterns

AP CSP Day 26: Iteration Patterns

Key Concepts Nested loops occur when one loop appears inside another, multiplying the total number of iterations. For a nested loop with an outer loop running m times and an...

AP CSP Day 26: Iteration Patterns

Key Concepts Nested loops occur when one loop appears inside another, multiplying the total number of iterations. For a nested loop with an outer loop running m times and an...

AP CSP Day 25: Conditionals

AP CSP Day 25: Conditionals

Key Concepts Nested conditionals occur when one IF statement appears inside another, creating decision trees with multiple outcomes. The order of conditions in an IF/ELSE IF chain matters because the...

AP CSP Day 25: Conditionals

Key Concepts Nested conditionals occur when one IF statement appears inside another, creating decision trees with multiple outcomes. The order of conditions in an IF/ELSE IF chain matters because the...

AP CSP Day 24: Boolean Logic

AP CSP Day 24: Boolean Logic

Key Concepts Truth tables systematically show every possible combination of input values and the resulting output for Boolean expressions. Mastering De Morgan's laws helps simplify complex Boolean conditions: NOT (A...

AP CSP Day 24: Boolean Logic

Key Concepts Truth tables systematically show every possible combination of input values and the resulting output for Boolean expressions. Mastering De Morgan's laws helps simplify complex Boolean conditions: NOT (A...

AP CSP Day 23: Variables And Assignment

AP CSP Day 23: Variables And Assignment

Key Concepts Variable tracing requires reading pseudocode line by line and updating each variable's value as assignment statements execute. A variable holds exactly one value at any moment; each new...

AP CSP Day 23: Variables And Assignment

Key Concepts Variable tracing requires reading pseudocode line by line and updating each variable's value as assignment statements execute. A variable holds exactly one value at any moment; each new...

AP CSP Day 22: Privacy PII And Ethical Computing

AP CSP Day 22: Privacy PII And Ethical Computing

Key Concepts Personally Identifiable Information (PII) is any data that can be used to identify a specific individual, including name, address, phone number, email, or government ID. The aggregation problem...

AP CSP Day 22: Privacy PII And Ethical Computing

Key Concepts Personally Identifiable Information (PII) is any data that can be used to identify a specific individual, including name, address, phone number, email, or government ID. The aggregation problem...

AP CSP Day 21: Encryption And Security Tradeoffs

AP CSP Day 21: Encryption And Security Tradeoffs

Key Concepts Encryption transforms readable data (plaintext) into an unreadable format (ciphertext) using a key, protecting it from unauthorized access during transmission or storage. Public key cryptography uses a public...

AP CSP Day 21: Encryption And Security Tradeoffs

Key Concepts Encryption transforms readable data (plaintext) into an unreadable format (ciphertext) using a key, protecting it from unauthorized access during transmission or storage. Public key cryptography uses a public...

AP CSP Day 20: Internet Protocols

AP CSP Day 20: Internet Protocols

Key Concepts Protocols are agreed-upon rules that govern how devices communicate over a network. TCP (Transmission Control Protocol) ensures reliable, ordered delivery by requiring acknowledgment of received packets, while UDP...

AP CSP Day 20: Internet Protocols

Key Concepts Protocols are agreed-upon rules that govern how devices communicate over a network. TCP (Transmission Control Protocol) ensures reliable, ordered delivery by requiring acknowledgment of received packets, while UDP...

AP CSP Day 18: Packet Switching

AP CSP Day 18: Packet Switching

Key Concepts Packet switching breaks data into small packets that travel independently across a network and are reassembled at the destination. Each packet may take a different route through the...

AP CSP Day 18: Packet Switching

Key Concepts Packet switching breaks data into small packets that travel independently across a network and are reassembled at the destination. Each packet may take a different route through the...

AP CSP Day 19: Fault Tolerance And Redundancy

AP CSP Day 19: Fault Tolerance And Redundancy

Key Concepts Fault tolerance is the ability of a system to continue operating correctly even when some components fail. Redundancy, achieved by duplicating critical connections or hardware, is the primary...

AP CSP Day 19: Fault Tolerance And Redundancy

Key Concepts Fault tolerance is the ability of a system to continue operating correctly even when some components fail. Redundancy, achieved by duplicating critical connections or hardware, is the primary...

AP CSP Day 17: Internet Structure

AP CSP Day 17: Internet Structure

Key Concepts The internet is a network of networks connected through routers that forward data packets toward their destinations. No single entity controls the entire internet; its decentralized structure makes...

AP CSP Day 17: Internet Structure

Key Concepts The internet is a network of networks connected through routers that forward data packets toward their destinations. No single entity controls the entire internet; its decentralized structure makes...

AP CSP Day 16: Data Compression

AP CSP Day 16: Data Compression

Key Concepts Data compression reduces file size by encoding information more efficiently. Lossless compression preserves all original data and allows exact reconstruction, while lossy compression permanently discards some data to...

AP CSP Day 16: Data Compression

Key Concepts Data compression reduces file size by encoding information more efficiently. Lossless compression preserves all original data and allows exact reconstruction, while lossy compression permanently discards some data to...

AP CSP Day 15: Metadata

AP CSP Day 15: Metadata

Key Concepts Metadata is data that describes other data, such as the file size, creation date, author, or location attached to a photo or document. While the content of a...

AP CSP Day 15: Metadata

Key Concepts Metadata is data that describes other data, such as the file size, creation date, author, or location attached to a photo or document. While the content of a...

AP CSP Day 14: Bias In Data And Algorithms

AP CSP Day 14: Bias In Data And Algorithms

Key Concepts Algorithmic bias occurs when a model or decision system produces systematically unfair outcomes, often because the training data underrepresents certain groups. Data bias can stem from who collected...

AP CSP Day 14: Bias In Data And Algorithms

Key Concepts Algorithmic bias occurs when a model or decision system produces systematically unfair outcomes, often because the training data underrepresents certain groups. Data bias can stem from who collected...

AP CSP Day 13: Correlation vs. Causation

AP CSP Day 13: Correlation vs. Causation

Key Concepts Correlation describes a statistical relationship between two variables that tend to change together, while causation means one variable directly causes changes in the other. Observational data can establish...

AP CSP Day 13: Correlation vs. Causation

Key Concepts Correlation describes a statistical relationship between two variables that tend to change together, while causation means one variable directly causes changes in the other. Observational data can establish...

AP CSP Day 11: Data Collection And Cleaning

AP CSP Day 11: Data Collection And Cleaning

Key Concepts Data collection methods include surveys, sensors, manual entry, and automated logging, each introducing different potential sources of error. Data cleaning involves identifying and correcting issues like missing values,...

AP CSP Day 11: Data Collection And Cleaning

Key Concepts Data collection methods include surveys, sensors, manual entry, and automated logging, each introducing different potential sources of error. Data cleaning involves identifying and correcting issues like missing values,...

AP CSP Day 12: Data Visualization And Limitations

AP CSP Day 12: Data Visualization And Limitations

Key Concepts Data visualizations like bar charts, scatter plots, and line graphs communicate patterns in data more intuitively than raw numbers. However, visualizations can be misleading when axes are truncated,...

AP CSP Day 12: Data Visualization And Limitations

Key Concepts Data visualizations like bar charts, scatter plots, and line graphs communicate patterns in data more intuitively than raw numbers. However, visualizations can be misleading when axes are truncated,...