Please enable JavaScript to use CodeHS

Tennessee Coding II

Selection and Iteration

Students learn how to control the flow of a program using conditional statements and loops. They develop Boolean expressions, use relational and logical operators, and write selection statements with if, if-else, and if-else-if. Students also explore iteration through while and for loops, including nested and compound iterations.

Lessons

4.1 Algorithms with Selection and Repetition

  • Algorithms with Selection and Repetition
  • Morning Jog Algorithm
  • Algorithms with Selection and Repetition
  • Everyday Algorithms (Part 1)
  • Everyday Algorithms (Part 2)
  • +2 more

4.2 Boolean Expressions

  • Boolean Expressions
  • Boolean Predictions
  • Debugging: Boolean Expressions
  • Boolean Expressions
  • Boolean Truth Tables
  • +4 more

4.3 if Statements

  • If Statements
  • Temperature Checks
  • Debugging: If Statements
  • Exploration: Running Speed
  • If Statements
  • +3 more

4.4 Nested if Statements

  • if-else-if Statements
  • Positive, Negative, or Zero
  • if-else-if Statements
  • Exploration: Salmon Spawn
  • Smoothie Order
  • +6 more

4.5 Compound Boolean Expressions

  • Compound Boolean Expressions
  • Bank Eligibility
  • Debugging: Booleans
  • Exploration: City Bus Discounts
  • Converting Pseudocode
  • +3 more

4.6 Comparing Boolean Expressions

  • Equivalent Boolean Expressions
  • De Morgan's Example
  • Amusement Park
  • Equivalent Boolean Expressions
  • Simplifying Boolean Expressions
  • +6 more

4.7 while Loops

  • While Loops
  • While Loop Countdown
  • Exploration: Lighting
  • While Loops
  • Making Taffy
  • +5 more

4.8 for Loops

  • For Loops (Part 1)
  • For Loops (Part 2)
  • Two Loops
  • Exploration: For Loop Variations
  • Print the Odds
  • +4 more

4.9 Implementing Selection and Iteration Algorithms

  • Implementing Selection and Iteration Algorithms
  • Running Average
  • Exploration: Factors
  • Exploration: The Leftovers
  • Max and Min Values
  • +3 more

4.10 Implementing String Algorithms

  • Implementing String Algorithms
  • Traversing Strings
  • Mystery String Algorithms Introduction
  • Exploration: Mystery Algorithm 1
  • Exploration: Mystery Algorithm 2
  • +6 more

4.11 Nested Iteration

  • Nested Iteration (Part 1)
  • Nested Iteration (Part 2)
  • Multiplication Table
  • Exploration: Make a Rectangle
  • Exploration: Inverted Triangle
  • +4 more

4.12 Informal Run-Time Analysis

  • Informal Run-Time Analysis
  • Evaluating Algorithms with Statement Execution Counts
  • Evaluating Algorithms with Statement Execution Counts Submission
  • Exploration: Statement Execution Count
  • Informal Run-Time Analysis
  • +2 more

4.13 Selection and Iteration Quiz

  • Unit Quiz: Selection and Iteration

Courses that include this module