AP COMPUTER SCIENCE PRINCIPLES

Here are the updated definitions for AP Computer Science up to Unit 5.5:

Unit 1: Introduction to Programming

1. Function: Simplifies code by breaking it into smaller, reusable pieces.

2. Call a Function: Executes a predefined function.

3. Define a Function: Specifies the function's name and body (the code it executes).

4. Snake Case: Uses lowercase letters and underscores for naming (e.g., my_function).

5. Decomposition: Breaks code into smaller, manageable parts.

6. Top-Down Design: Splits a complex problem into smaller, independently solvable parts.

7. Precondition: A required condition for a function to execute.

8. Postcondition: A condition that must be true after a function executes.

9. Comment: Explains the purpose of code or functions for better understanding.

10. Procedural Abstraction: Describes program steps without detailing how they work.

11. Documentation: Guides others on how to use code or functions.

12. For Loops with Karel: Automates repetitive actions by specifying the number of repetitions.

13. Condition: A true/false statement that determines code execution.

14. If Statements with Karel: Executes code if a condition is true.

15. If-Else Statement: Executes one block of code if true; another block if false.

16. While Loops with Karel: Repeats code while a condition is true.

17. Control Structure: Directs program flow (e.g., if-else or loops).

18. Bug: Errors in code—syntax, runtime, or logic.

19. Debugging: Process of finding and fixing errors.

20. Rubber Duck Debugging: Explaining code aloud to identify issues.

21. Pseudocode: Simplified description of an algorithm using plain language.

22. Algorithm: A sequence of steps to solve a problem.

23. Sequencing: Ordered execution of instructions.

24. Selection: Chooses a path based on conditions (e.g., if-else).

25. Iteration: Repeats actions (e.g., loops).

Unit 3: Programming with Python

1. Variable: Stores data for use in the program.

2. Input Function: Accepts user input as a string.

3. String Concatenation: Combines strings into one.

4. Operators: Perform mathematical or logical operations (e.g., +, -, *, /).

5. Modulus (Mod): Finds the remainder of a division.

6. Order of Operations: Follows PEMDAS for solving equations.

Unit 4: Python Control Structures

1. Boolean: Represents true or false values.

2. Logical Operators: Combine conditions (and, or, not).

3. If Statements: Executes code if a condition is true.

4. If-Else Statements: Executes different code blocks based on condition truth.

5. Elif: Used for additional conditions if the first is false.

6. While Loops: Repeats actions while a condition is true.

7. Break: Ends a loop prematurely.

8. Continue: Skips the current iteration and moves to the next.

Unit 5: Functions and Parameters

1. Functions with Parameters: Accept input values for processing.

2. Functions with Return Values: Outputs a result to use elsewhere in the program.

3. Functions Calling Functions: Uses one function within another.