Below are lists of the Computational Thinking Practices, Big Ideas, and Course Content in Unit 5. For more information on the Unit 5 Standards, please refer to the 2023 Course and Exam Description document.
Practice 2
Skill 2.A: Represent algorithmic processes without using a programming language.
Skill 2.B: Implement and apply an algorithm.
Practice 3
Skill 3.B: Use abstraction to manage complexity in a program.
Practice 4
Skill 4.B: Determine the result of code segments.
Big Idea 3: Algorithms and Programming (AAP)
AAP-2: The way statements are sequenced and combined in a program determines the computed results. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.
AAP-3: Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.
Enduring Understanding, Learning Objectives, and Essential Knowledge
AAP-1.A.1: A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
AAP-1.A.2: Using meaningful variable names helps with the readability of program code and understanding of what values are represented by the variables.
AAP-1.A.3: Some programming languages provide types to represent data, which are referenced using variables. These types include numbers, Booleans, lists, and strings.
AAP-1.A.1: A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
AAP-1.A.2: Using meaningful variable names helps with the readability of program code and understanding of what values are represented by the variables.
AAP-1.A.3: Some programming languages provide types to represent data, which are referenced using variables. These types include numbers, Booleans, lists, and strings.
AAP-1.A.4: Some values are better suited to representation using one type of datum rather than another.
AAP-1.B.1: The assignment operator allows a program to change the value represented by a variable.
AAP-1.B.2: The exam reference sheet provides the “←” operator to use for assignment. For example, a ← expression evaluates expression and then assigns the result to the variable a.
AAP-1.B.3: The value stored in a variable will be the most recent value assigned. For example:
AAP-1.C.4: A string is an ordered sequence of characters.
AAP-1.D.6: The use of lists allows multiple related items to be treated as a single value. Lists are referred to by different names, such as array, depending on the programming language. EXCLUSION STATEMENT(EK APP-1.D.6): The use of linked lists is outside the scope of this course and the AP Exam.
AAP-3.D.1: A software library contains procedures that may be used in creating new programs.
AAP-3.D.3: The use of libraries simplifies the task of creating complex programs.
AAP-3.D.4: Application program interfaces (APIs) are specifications for how the procedures in a library behave and can be used.
AAP-3.D.5: Documentation for an API/library is necessary in understanding the behaviors provided by the API/library and how to use them.
DAT-1.A.1: Data values can be stored in variables, lists of items, or standalone constants and can be passed as input to (or output from) procedures.
AAP-2.D: Students will evaluate expressions that manipulate strings.
AAP-2.D.1: String concatenation joins together two or more strings end-to-end to make a new string.
AAP-2.D.2: A substring is part of an existing string.
AAP-2.J: Students will be able to express an algorithm that uses iteration without using a programming language.
AAP-2.J.1: Iteration is a repeating portion of an algorithm. Iteration repeats a specified number of times or until a given condition is met.
AAP-2.K: Students will write and determine the result of iteration statements.
AAP-2.K.2: The exam reference sheet provides
REPEAT n TIMES
{
<block of statements>
}
in which the block of statements is executed n times.
AAP-2.K.3: The exam reference sheet provides
REPEAT UNTIL(condition)
{
<block of statements>
}
in which the code in block of statements is repeated until the Boolean expression condition evaluates to true.
AAP-2.K.4: In REPEAT UNTIL(condition) iteration, an infinite loop occurs when the ending condition will never evaluate to true.
AAP-2.K.5: In REPEAT UNTIL(condition) iteration, if the conditional evaluates to true initially, the loop body is not executed at all, due to the condition being checked before the loop.
AAP-2.L: Compare multiple algorithms to determine if they yield the same side effect or result.
AAP-2.L.1: Algorithms can be written in different ways and still accomplish the same tasks.
AAP-2.L.2: Algorithms that appear similar can yield different side effects or results.
AAP-2.L.3: Some conditional statements can be written as equivalent Boolean expressions.
AAP-2.L.4: Some Boolean expressions can be written as equivalent conditional statements.
AAP-2.L.5: Different algorithms can be developed or used to solve the same problem.
AAP-2.E: Students will write and evaluate expressions using relational operators.
AAP-2.H: Students will write and determine the results of conditional statements.
AAP-2.H.1: Conditional statements, or “if-statements,” affect the sequential flow of control by executing different statements based on the value of a Boolean expression.
AAP-2.I: For nested selection:
Write nested conditional statements
Determine the result of nested conditional statements
CRD-2.J: Identify inputs and corresponding expected outputs or behaviors that can be used to check the correctness of an algorithm or program.
CRD-2.J.1: In the development process, testing uses defined inputs to ensure that an algorithm or program is producing the expected outcomes. Programmers use the results from testing to revise their algorithms or programs.
CRD-2.J.2: Defined inputs used to test a program should demonstrate the different expected outcomes that are at or just beyond the extremes (minimum and maximum) of input data.
CRD-2.J.3: Program requirements are needed to identify appropriate defined inputs for testing.
AAP-2.C: Students will evaluate expressions that use arithmetic operators (modulus).
AAP-2.C.1: Arithmetic operators are part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
AAP-2.C.2: The exam reference sheet provides a MOD b, which evaluates to the remainder when a is divided by b. Assume that a is an integer greater than or equal to 0 and b is an integer greater than 0. For example, 17 MOD 5 evaluates to 2.
AAP-2.C.3: The exam reference sheet provides the arithmetic operators +, -, *, /, and MOD.
a+b
a-b
a*b
a/b
a MOD b
AAP-2.C.4: The order of operations used in mathematics applies when evaluating expressions. The MOD operator has the same precedence as the * and / operators.
AAP-2.K: Students will write and determine the results of iteration statements.
AAP-3.D.2: Existing code segments can come from internal or external sources, such as libraries or previously written code.
AAP-2.A: Students will express an algorithm that uses sequencing without using a programming language.
AAP-2.A.1: An algorithm is a finite set of instructions that accomplish a specific task.
AAP-2.A.2: Beyond visual and textual programming languages, algorithms can be expressed in a variety of ways, such as natural language, diagrams, and pseudocode.
AAP-2.A.3: Algorithms executed by programs are implemented using programming languages.
AAP-2.A.4: Every algorithm can be constructed using combinations of sequencing, selection, and iteration.
AAP-2.B: Students will represent a step-by-step algorithmic process using sequential code statements.
AAP-2.B.1: Sequencing is the application of each step of an algorithm in the order in which the code statements are given.
AAP-2.B.2: A code statement is a part of program code that expresses an action to be carried out.
AAP-2.B.3: An expression can consist of a value, a variable, an operator, or a procedure call that returns a value.
AAP-2.B.4: Expressions are evaluated to produce a single value.
AAP-2.B.5: The evaluation of expressions follows a set order of operations defined by the programming language.
AAP-2.B.6: Sequential statements execute in the order they appear in the code segment.
AAP-2.B.7: Clarity and readability are important considerations when expressing an algorithm in a programming language.
AAP-2.G: Students will express an algorithm that uses selection without using a programming language.
AAP-2.G.1: Selection determines which parts of an algorithm are executed based on a condition being true or false.
AAP-2.M.1: Algorithms can be created from an idea, by combining existing algorithms, or by modifying existing algorithms.
AAP-2.M.2: Knowledge of existing algorithms can help in constructing new ones. Some existing algorithms include:
determining the maximum or minimum value of two or more numbers
computing the sum or average of two or more numbers
identifying if an integer is or is not evenly divisible by another integer
determining a robot’s path through a maze
AAP-2.M.3: Using existing correct algorithms as building blocks for constructing another algorithm has benefits such as reducing development time, reducing testing, and simplifying the identification of errors.
AAP-3.A: For procedure calls:
Write statements to call procedures.
Determine the result or effect of a procedure call.
AAP-3.A.1: A procedure is a named group of programming instructions that may have parameters and return values.
AAP-3.A.2: Procedures are referred to by different names, such as method or function, depending on the programming language.
AAP-3.A.3: Parameters are input variables of a procedure. Arguments specify the values of the parameters when a procedure is called.
AAP-3.A.4: A procedure call interrupts the sequential execution of statements, causing the program to execute the statements within the procedure before continuing. Once the last statement in the procedure (or a return statement) has executed, flow of control is returned to the point immediately following where the procedure was called.
AAP-3.B.1: One common type of abstraction is procedural abstraction, which provides a name for a process and allows a procedure to be used only knowing what it does, not how it does it.
AAP-3.B.2: Procedural abstraction allows a solution to a large problem to be based on the solutions of smaller subproblems. This is accomplished by creating procedures to solve each of the subproblems.
AAP-3.B.3: The subdivision of a computer program into separate subprograms is called modularity.
AAP-3.B.4: A procedural abstraction may extract shared features to generalize functionality instead of duplicating code. This allows for program code reuse, which helps manage complexity.
AAP-3.B.5: Using parameters allows procedures to be generalized, enabling the procedures to be reused with a range of input values or arguments.
AAP-3.B.6: Using procedural abstraction helps improve code readability.
AAP-3.B.7: Using procedural abstraction in a program allows programmers to change the internals of the procedure (to make it faster, more efficient, use less storage, etc.) without needing to notify users of the change as long as what the procedure does is preserved.
AAP-2.H.2: The exam reference sheet provides
IF(condition)
{
<block of statements>
}
in which the code in block of statements is executed if the Boolean expression condition evaluates to true; no action is taken if condition evaluates to false.
AAP-2.H.3: The exam reference sheet provides
IF(condition)
{
<first block of statements>
}
ELSE
{
<second block of statements>
}
in which the code in first block of statements is executed if the Boolean expression condition evaluates to true; otherwise, the code in second block of statements is executed.
AAP-2.M: For algorithms:
a. Create algorithms.
AAP-3.A.5: The exam reference sheet provides procName (arg1, arg2, …) as a way to call PROCEDURE procName(parameter1, parameter2, …) which takes zero or more arguments; arg1 is assigned to parameter1, arg2 is assigned to parameter2, and so on.
AAP-3.A.6: The exam reference sheet provides the procedure DISPLAY(expression) to display the value of expression, followed by a space.
AAP-3.A.7: The exam reference sheet provides the RETURN(expression) statement, which is used to return the flow of control to the point where the procedure was called and to return the value of expression.
AAP-3.A.8: The exam reference sheet provides result ß procName(arg1, arg2, …) to assign to result the “value of the procedure” being returned by calling PROCEDURE procName(parameter1, parameter2, …){ <block of statements> RETURN(expression) }
AAP-3.A.9: The exam reference sheet provides procedure INPUT(), which accepts a value from the user and returns the input value.
AAP-3.C.1: The exam reference sheet provides
PROCEDURE procName(parameter1, parameter2, …)
{
<block of statements>
}
which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements.
AAP-3.C.2: The exam reference sheet provides
PROCEDURE procName(parameter1, parameter2, …)
{
<block of statements>
RETURN(expression)
}
which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements and returns the value of expression. The RETURN statement may appear at any point inside the procedure and causes an immediate return from the procedure back to the calling statement.
AAP-2.E: Students will write and evaluate expressions using relational operators.
AAP-3.A: Students will use abstraction to manage complexity in a program.
AAP-3.A: Students will determine the result of code segments.
AAP-1.A: Students will represent a value with a variable.
AAP-1.A.1: A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
AAP-1.A.2: Using meaningful variable names helps with the readability of program code and understanding of what values are represented by the variables.
AAP-1.A.3: Some programming languages provide types to represent data, which are referenced using variables. These types include numbers, Booleans, lists, and strings.
AAP-1.A.4: Some values are better suited to representation using one type of datum rather than another.
AAP-1.B: Students will determine the value of a variable as a result of an assignment.
AAP-1.B.1: The assignment operator allows a program to change the value represented by a variable.
AAP-1.B.2: The exam reference sheet provides the “←” operator to use for assignment. For example, a ← expression evaluates expression and then assigns the result to the variable a.
AAP-1.B.3: The value stored in a variable will be the most recent value assigned. For example:
AAP-1.C: Students will represent a list or string using a variable.
AAP-1.C.4: A string is an ordered sequence of characters.
AAP-1.D.6: The use of lists allows multiple related items to be treated as a single value. Lists are referred to by different names, such as array, depending on the programming language. EXCLUSION STATEMENT(EK APP-1.D.6): The use of linked lists is outside the scope of this course and the AP Exam.
AAP-2.A: Students will express an algorithm that uses sequencing without using a programming language.
AAP-2.A.1: An algorithm is a finite set of instructions that accomplish a specific task.
AAP-2.A.2: Beyond visual and textual programming languages, algorithms can be expressed in a variety of ways, such as natural language, diagrams, and pseudocode.
AAP-2.A.3: Algorithms executed by programs are implemented using programming languages.
AAP-2.A.4: Every algorithm can be constructed using combinations of sequencing, selection, and iteration.
AAP-2.B: Students will represent a step-by-step algorithmic process using sequential code statements.
AAP-2.B.1: Sequencing is the application of each step of an algorithm in the order in which the code statements are given.
AAP-2.B.2: A code statement is a part of program code that expresses an action to be carried out.
AAP-2.B.3: An expression can consist of a value, a variable, an operator, or a procedure call that returns a value.
AAP-2.B.4: Expressions are evaluated to produce a single value.
AAP-2.B.5: The evaluation of expressions follows a set order of operations defined by the programming language.
AAP-2.B.6: Sequential statements execute in the order they appear in the code segment.
AAP-2.B.7: Clarity and readability are important considerations when expressing an algorithm in a programming language.
AAP-2.C: Students will evaluate expressions that use arithmetic operators (modulus).
AAP-2.C.1: Arithmetic operators are part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
AAP-2.C.2: The exam reference sheet provides a MOD b, which evaluates to the remainder when a is divided by b. Assume that a is an integer greater than or equal to 0 and b is an integer greater than 0. For example, 17 MOD 5 evaluates to 2.
AAP-2.C.3: The exam reference sheet provides the arithmetic operators +, -, *, /, and MOD.
a+b
a-b
a*b
a/b
a MOD b
AAP-2.C.4: The order of operations used in mathematics applies when evaluating expressions. The MOD operator has the same
precedence as the * and / operators.
AAP-2.D: Students will evaluate expressions that manipulate strings.
AAP-2.D.1: String concatenation joins together two or more strings end-to-end to make a new string.
AAP-2.D.2: A substring is part of an existing string.
AAP-2.E: Students will write and evaluate expressions using relational operators.
Write expressions using relational operators.
Evaluate expressions that use relational operators.
AAP-2.G: Students will express an algorithm that uses selection without using a programming language.
AAP-2.G.1: Selection determines which parts of an algorithm are executed based on a condition being true or false.
AAP-2.H: Students will write and determine the results of conditional statements.
Write conditional statments.
Determine the result of conditional statements.
AAP-2.H.1: Conditional statements, or “if-statements,” affect the sequential flow of control by executing different statements based on the value of a Boolean expression.
AAP-2.H.2: The exam reference sheet provides
IF(condition)
{
<block of statements>
}
in which the code in block of statements is executed if the Boolean expression condition evaluates to true; no action is taken if condition evaluates to false.
AAP-2.H.3: The exam reference sheet provides
IF(condition)
{
<first block of statements>
}
ELSE
{
<second block of statements>
}
in which the code in first block of statements is executed if the Boolean expression condition evaluates to true; otherwise, the code in second block of statements is executed.
AAP-2.I: For nested selection:
Write nested conditional statements
Determine the result of nested conditional statements
AAP-2.J: Students will be able to express an algorithm that uses iteration without using a programming language.
AAP-2.J.1: Iteration is a repeating portion of an algorithm. Iteration repeats a specified number of times or until a given condition is met.
AAP-2.K: Students will write and determine the result of iteration statements.
Write iteration statements.
Determine the result or side effect of iteration statements.
AAP-2.K.2: The exam reference sheet provides
REPEAT n TIMES
{
<block of statements>
}
in which the block of statements is executed n times.
AAP-2.K.3: The exam reference sheet provides
REPEAT UNTIL(condition)
{
<block of statements>
}
in which the code in block of statements is repeated until the Boolean expression condition evaluates to true.
AAP-2.K.4: In REPEAT UNTIL(condition) iteration, an infinite loop occurs when the ending condition will never evaluate to true.
AAP-2.K.5: In REPEAT UNTIL(condition) iteration, if the conditional evaluates to true initially, the loop body is not executed at all, due to the condition being checked before the loop.
AAP-2.L: Compare multiple algorithms to determine if they yield the same side effect or result.
AAP-2.L.1: Algorithms can be written in different ways and still accomplish the same tasks.
AAP-2.L.2: Algorithms that appear similar can yield different side effects or results.
AAP-2.L.3: Some conditional statements can be written as equivalent Boolean expressions.
AAP-2.L.4: Some Boolean expressions can be written as equivalent conditional statements.
AAP-2.L.5: Different algorithms can be developed or used to solve the same problem.
AAP-2.M: For algorithms:
Create algorithms.
AAP-2.M.1: Algorithms can be created from an idea, by combining existing algorithms, or by modifying existing algorithms.
AAP-2.M.2: Knowledge of existing algorithms can help in constructing new ones. Some existing algorithms include:
● determining the maximum or minimum value of two or more numbers
● computing the sum or average of two or more numbers
● identifying if an integer is or is not evenly divisible by another integer
● determining a robot’s path through a maze
AAP-2.M.3: Using existing correct algorithms as building blocks for constructing another algorithm has benefits such as reducing development time, reducing testing, and simplifying the identification of errors.
AAP-3.A: For procedure calls:
Write statements to call procedures.
Determine the result or effect of a procedure call.
AAP-3.A.1: A procedure is a named group of programming instructions that may have parameters and return values.
AAP-3.A.2: Procedures are referred to by different names, such as method or function, depending on the programming language.
AAP-3.A.3: Parameters are input variables of a procedure. Arguments specify the values of the parameters when a procedure is called.
AAP-3.A.4: A procedure call interrupts the sequential execution of statements, causing the program to execute the statements within the procedure before continuing. Once the last statement in the procedure (or a return statement) has executed, flow of control is returned to the point immediately following where the procedure was called.
AAP-3.A.5: The exam reference sheet provides procName (arg1, arg2, …) as a way to call PROCEDURE procName(parameter1, parameter2, …) which takes zero or more arguments; arg1 is assigned to parameter1, arg2 is assigned to parameter2, and so on.
AAP-3.A.6: The exam reference sheet provides the procedure DISPLAY(expression) to display the value of expression, followed by a space.
AAP-3.A.7: The exam reference sheet provides the RETURN(expression) statement, which is used to return the flow of control to the point where the procedure was called and to return the value of expression.
AAP-3.A.8: The exam reference sheet provides result ß procName(arg1, arg2, …) to assign to result the “value of the procedure” being returned by calling PROCEDURE procName(parameter1, parameter2, …){ <block of statements> RETURN(expression) }
AAP-3.A.9: The exam reference sheet provides procedure INPUT(), which accepts a value from the user and returns the input value.
AAP-3.B.1: One common type of abstraction is procedural abstraction, which provides a name for a process and allows a procedure to be used only knowing what it does, not how it does it.
AAP-3.B.2: Procedural abstraction allows a solution to a large problem to be based on the solutions of smaller subproblems. This is accomplished by creating procedures to solve each of the subproblems.
AAP-3.B.3: The subdivision of a computer program into separate subprograms is called modularity.
AAP-3.B.4: A procedural abstraction may extract shared features to generalize functionality instead of duplicating code. This allows for program code reuse, which helps manage complexity.
AAP-3.B.5: Using parameters allows procedures to be generalized, enabling the procedures to be reused with a range of input values or arguments.
AAP-3.B.6: Using procedural abstraction helps improve code readability.
AAP-3.B.7: Using procedural abstraction in a program allows programmers to change the internals of the procedure (to make it faster, more efficient, use less storage, etc.) without needing to notify users of the change as long as what the procedure does is preserved.
AAP-3.C.1: The exam reference sheet provides
PROCEDURE procName(parameter1, parameter2, …)
{
<block of statements>
}
which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements.
AAP-3.C.2: The exam reference sheet provides
PROCEDURE procName(parameter1, parameter2, …)
{
<block of statements>
RETURN(expression)
}
which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements and returns the value of expression. The RETURN statement may appear at any point inside the procedure and causes an immediate return from the procedure back to the calling statement.
AAP-3.D.1: A software library contains procedures that may be used in creating new programs.
AAP-3.D.2: Existing code segments can come from internal or external sources, such as libraries or previously written code.
AAP-3.D.3: The use of libraries simplifies the task of creating complex programs.
AAP-3.D.4: Application program interfaces (APIs) are specifications for how the procedures in a library behave and can be used.
AAP-3.D.5: Documentation for an API/library is necessary in understanding the behaviors provided by the API/library and how to use them.
DAT-1.A.1: Data values can be stored in variables, lists of items, or standalone constants and can be passed as input to (or output from) procedures.
CRD-2.J: Identify inputs and corresponding expected outputs or behaviors that can be used to check the correctness of an algorithm or program.
CRD-2.J.1: In the development process, testing uses defined inputs to ensure that an algorithm or program is producing the expected outcomes. Programmers use the results from testing to revise their algorithms or programs.
CRD-2.J.2: Defined inputs used to test a program should demonstrate the different expected outcomes that are at or just beyond the extremes (minimum and maximum) of input data.
CRD-2.J.3: Program requirements are needed to identify appropriate defined inputs for testing.