AP CSP Day 6 - Selection (Conditionals)
AP CSP Day 6 - Selection (Conditionals)
Course Information
- Course: AP Computer Science Principles
- Unit: Big Idea 1 - Creative Development (CRD)
- Lesson: Day 6 (50 minutes)
- Learning Objective: CRD-1.F - Use selection structures appropriately
Learning Objectives
Primary Goals
Students will be able to:
- Understand the concept of selection in programming
- Create programs using conditional statements
- Test and refine conditional logic
- Analyze real-world scenarios that require conditionals
AP Exam Alignment
- Big Idea 1: Creative Development (10-13% of AP Exam)
- Essential Knowledge: CRD-1.F.1, CRD-1.F.2, CRD-1.F.3
- Computational Thinking Practice: 1.A - Investigate the situation, context, or task
Lesson Structure (50 minutes)
Opening Hook (10 minutes)
1.1 Welcome & Lesson Preview (5 minutes)
Teacher Activities:
- Recap previous day's content on algorithm design and testing
- Introduce today's topic on selection and conditionals
Student Activities:
- Think about: "What are some examples where we use conditionals in daily life?"
1.2 Conditional Examples Challenge (5 minutes)
Activity: "Identify the Conditional"
Instructions:
- Groups of 4-6 students
- Identify conditionals in given scenarios
- Discuss the importance of conditionals
Purpose: Activate thinking about conditionals
Core Content Instruction (20 minutes)
2.1 What is Selection? (10 minutes)
Definition (CRD-1.F.1):
Selection involves making decisions based on conditions.
Key Concepts:
- If statements: Making a decision
- Else statements: Providing an alternative
- Elif statements: Multiple conditions
Case Study: Using conditionals in a simple program
- Program: Determine if a number is positive, negative, or zero
- Conditionals: if num > 0; elif num < 0; else
2.2 Types of Conditionals (5 minutes)
Examples:
- Simple if: if condition:
- If-else: if condition: ... else:
- Nested if: if condition1: if condition2:
Discussion Questions:
- What makes a good conditional statement?
- Can you think of an example where conditionals are used in daily life?
- Why are conditionals important in programming?
2.3 Advanced Conditionals (5 minutes)
Why is it important?:
- Complex logic: Handling multiple conditions
- Efficiency: Reducing unnecessary checks
Discussion Questions:
- How can we handle complex logic with conditionals?
- Why is efficiency important in conditional statements?
Hands-On Activity (15 minutes)
3.1 Group Project: Create a Program with Conditionals (15 minutes)
Activity: "Design a Program"
Instructions:
- Groups of 3-4 students
- Design a program that uses conditionals
- Test the program for correctness
- Present the program to the class
Materials:
- **Program design worksheet
- **Conditional usage checklist
Learning Goals:
- **Understand selection
- **Create programs using conditionals
- **Test conditional logic
- **Present ideas effectively
Assessment:
- **Group participation
- **Program quality
- **Testing thoroughness
- **Presentation clarity
Closure & Preview (5 minutes)
4.1 Key Concepts Review (2 minutes)
Today's Learning Highlights:
- ✅ Understanding the concept of selection in programming
- ✅ Creating programs using conditional statements
- ✅ Testing and refining conditional logic
- ✅ Analyzing real-world scenarios that require conditionals
AP Exam Connection:
- These concepts will appear in AP exam multiple choice questions
- Understanding conditionals is crucial for the Create Performance Task
4.2 Next Class Preview (3 minutes)
Day 7 Topic: "Boolean Logic and Compound Conditions"
- Learning Objective: CRD-1.G - Use Boolean logic and compound conditions appropriately
- Activity: Practicing Boolean logic
- Homework: Think about a recent program you used. What conditionals did it employ?