Module 4 - Ifs and Lists
Before the week begins
Major Topics
Materials
Due This Week:
Graded This Week
Student Difficulty
Module 4 - Staff Meeting
Lessons
Lesson 27- If Statements
Summary: IF statements allow your program to do different things dependent on boolean conditions. The body of the IF statement is either executed or not, which affects the flow of the program.
Learning Objectives:
- Define an If Statement
- Evaluate a conditional expression
- Determine whether a situation requires an If statement
- Write code that involves simple if statement
- Write code that involves nested if statements
- Write code with branching conditions
- Trace branching control flow
- Differentiate between double IFs and the ELIF
Activities:
- Lesson: If Statements
- Quiz: If Statements
- Programming: If Statements
Misconceptions:
- Students believe that IF statements are required to write boolean expressions
- Students do not understand how expressions can be evaluated in a Truthy way
- Students believe that it is necessary to test booleans for equality with True and False (is_raining==True)
Lesson 28- Truthiness
Summary: Any expression can be used as a conditional expression. Succinctly, any zero or empty value is considered false, and non-zero/non-empty values are considered true.
Learning Objectives:
- Define the concept of Truthiness
- Evaluate a conditional expression
Activities:
- Lesson: Truthiness
- Quiz: Truthiness
Misconceptions:
- Students do not understand how expressions can be evaluated in a Truthy way
- Students believe that it is necessary to test booleans for equality with True and False (is_raining==True)
Lesson 29- Nested Ifs
Summary: IF statements allow your program to do different things dependent on boolean conditions. The body of the IF statement is either executed or not, which affects the flow of the program.
Learning Objectives:
- Write code that involves nested if statements
- Write code with branching conditions
- Trace branching control flow
- Differentiate between double IFs and the ELIF
Activities:
- Lesson: Nesting Blocks
- Quiz: Nesting Blocks
- Programming: Nesting Blocks
Misconceptions:
- Students do not understand that IF statements are sometimes unnecessary
Lesson 30- Lists
Summary: Lists are a complex type that hold multiple values at once.
Learning Objectives:
- Define the term “Composite Type”
- Create a list literal
- Identify the subtype of a list
- Differentiate between lists and empty lists
Activities:
- Lesson: Lists
- Quiz: Lists
- Programming: Lists
Misconceptions: None listed so far
Lesson 31- List Operations
Summary: You can use several different operations on a list, and lists have methods so they can be manipulated.
Learning Objectives:
- Subscript an element from a list
- Subscript a slice within a list
- Explain the nature of zero-based indexing
- Append an element to a list
- Pop an element from a list
- Create a list using range()
Activities:
- Lesson: List Operations
- Quiz: List Operations
- Programming: List Operations
Misconceptions: None listed so far