In this unit, students learn how to use Booleans and logical operators with control structures to make more advanced programs in JavaScript.
Comparison Operators
Lessons:
Booleans
Comparison Operators
AAP-2.E.1 AAP-2.F.4 AAP-2.E.2 AAP-2.F.5 AAP-2.F.1 AAP-2.F.2 AAP-2.F.3
Booleans
Relational Operators
Operands
Selection
Lessons:
If Statements
Random Numbers
AAP-2.G.1 AAP-2.I.2 AAP-2.H.1 AAP-2.L.3 AAP-2.H.2 AAP-2.L.4 AAP-2.H.3 AAP-3.E.2 AAP-2.I.1
Selection
Conditional Statements
Nested Conditionals
Equivalent Boolean Statements
Random Numbers
Iteration
Lessons:
While Loops
AAP-2.K.2 AAP-2.L.1 AAP-2.K.3 AAP-2.L.2 AAP-2.K.4 AAP-2.L.5 AAP-2.K.5
Iteration
Loops
Different but Equivalent Algorithms
Example Activities and Big Idea/Computational Thinking Practice
Better Password Prompt: Students write a program that uses a while loop to prompt a user for a password. They keep prompting the user for the password, and if they get it correct, they then break out of the loop. If they don't get it correct, they should give the user an error message. This activity requires that students use multiple program statements in a specific order to solve a problem.
[Big Idea AAP][Computational Thinking Practice 2]