Skip to main content
CS1 Python Subgoals
Contents
Search Book
close
Search Results:
No results.
Prev
Up
Next
Scratch ActiveCode
Profile
Course Home
Assignments
Practice
Peer Instruction (Instructor)
Peer Instruction (Student)
Change Course
Instructor's Page
Progress Page
Edit Profile
Change Password
Log Out
1
Demographic Survey
1.1
Demographic Survey
2
Evaluate Expressions
2.1
Declaration and Initialization
2.1.1
2.1.2
SG1: Decide order of operations
2.1.3
SG2: Determine operator behavior based on operands
2.1.4
SG3: Solve arithmetic, expression, or operation
2.2
Evaluate Expressions-WE1-P1
2.2.1
2.2.2
Expressions-WE1-P1
2.2.2
Exercises
2.3
Evaluate Expressions-WE1-P2
2.3.1
2.3.2
Evaluate Expressions-WE1-P2
2.3.2
Exercises
2.4
Basic Knowledge
2.4.1
2.4.2
SG1: Decide order of operations
2.4.3
SG2: Determine operator behavior based on operands
2.4.4
SG3: Solve arithmetic, expression, or operation
2.4.5
Questions to check understanding
2.5
Evaluate Expressions-WE2-P1
2.5.1
2.5.2
Evaluate Expressions-WE2-P1
2.5.2
Exercises
2.6
Evaluate Expressions-WE2-P2
2.6.1
2.6.2
Evaluate Expressions-WE2-P2
2.6.2
Exercises
2.7
Basic Operation Precedence
2.7.1
2.7.2
SG1: Decide order of operations
2.7.3
SG2: Determine operator behavior based on operands
2.7.4
SG3: Solve arithmetic, expression, or operation
2.7.5
Questions to check understanding
2.8
Evaluate Expressions-WE3-P1
2.8.1
2.8.2
Evaluate Expressions-WE3-P1
2.8.2
Exercises
2.9
Evaluate Expressions-WE3-P2
2.9.1
2.9.2
Evaluate Expressions-WE3-P2
2.9.2
Exercises
2.10
Operation Precedence
2.10.1
2.10.2
SG1: Decide order of operations
2.10.3
SG2: Determine operator behavior based on operands
2.10.4
SG3: Solve arithmetic, expression, or operation
2.10.5
Questions to check understanding
2.11
Evaluate Expressions-WE4-P1
2.11.1
2.11.2
Expressions-WE4-P1
2.11.2
Exercises
2.12
Evaluate Expressions-WE4-P2
2.12.1
2.12.2
Expressions-WE4-P2
2.12.2
Exercises
2.13
Compound Operators
2.13.1
2.13.2
SG1: Decide order of operations
2.13.3
SG2: Determine operator behavior based on operands
2.13.4
SG3: Solve arithmetic, expression, or operation
2.13.5
Questions to check understanding
2.14
Evaluate Expressions-WE5-P1
2.14.1
2.14.2
Expressions-WE5-P1
2.14.2
Exercises
2.15
Evaluate Expressions-WE5-P2
2.15.1
2.15.2
Expressions-WE5-P2
2.15.2
Exercises
2.16
Assign Booleans
2.16.1
2.16.2
SG1: Decide order of operations
2.16.3
SG2: Determine operator behavior based on operands
2.16.4
SG3: Solve arithmetic, expression, or operation
2.16.5
Questions to check understanding
2.17
Evaluate Expressions-WE8-P1
2.17.1
2.17.2
Expressions-WE8-P1
2.17.2
Exercises
2.18
Boolean Relations
2.18.1
2.18.2
SG1: Decide order of operations
2.18.3
SG2: Determine operator behavior based on operands
2.18.4
SG3: Solve arithmetic, expression, or operation
2.19
Evaluate Expressions-WE9-P1
2.19.1
2.19.2
Expressions-WE9-P1
2.19.2
Exercises
2.20
Boolean Truthiness
2.20.1
2.20.2
SG1: Decide order of operations
2.20.3
SG2: Determine operator behavior based on operands
2.20.4
SG3: Solve arithmetic, expression, or operation
2.20.5
Questions to check understanding
2.21
Evaluate Expressions-WE10-P1
2.21.1
2.21.2
Expressions-WE10-P1
2.21.2
Exercises
3
Write Expression
3.1
Convert Temperature
3.1.1
3.1.2
1. Craft name of variable
3.1.3
2. Determine operators, function calls, or method calls that will produce the value of variable
3.1.4
3. Decide order of operands and operators
3.2
WriteExpression-WE1-P1
3.2.1
WriteExpression-WE1-P1
3.2.1
Exercises
3.3
Assessment: Expressions
3.3
Exercises
4
Evaluate Conditionals
4.1
If Statements
4.1.1
4.1.2
1. Diagram which statements go together by indentation
4.1.3
2. For conditional, determine whether expression is true
4.1.4
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.1.5
4. Repeat 2 and 3 as necessary
4.2
Evaluate Conditionals-WE1-P1
4.2.1
Conditionals-WE1-P1
4.2.1
Exercises
4.3
If Else Statements
4.3.1
4.3.2
1. Diagram which statements go together by indentation
4.3.3
2. For conditional, determine whether expression is true
4.3.4
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.3.5
4. Repeat 2 and 3 as necessary
4.4
Evaluate Conditionals-WE2-P1
4.4.1
Conditionals-WE2-P1
4.4.1
Exercises
4.5
Apply Truthiness
4.5.1
4.5.2
1. Diagram which statements go together by indentation
4.5.3
2. For conditional, determine whether expression is true
4.5.4
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.5.5
2. For conditional, determine whether expression is true
4.5.6
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.5.7
2. For conditional, determine whether expression is true
4.5.8
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.5.9
Answer
4.6
Evaluate Conditionals-WE3-P1
4.6.1
Conditionals-WE3-P1
4.6.1
Exercises
4.7
Sequential If Statements
4.7.1
4.7.2
1. Diagram which statements go together by indentation
4.7.3
2. For conditional, determine whether expression is true
4.7.4
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.7.5
SG2: For if statement, determine whether expression is true
4.7.6
SG2.2: If false, follow next elif/else branch or exit conditional if no else branch
4.8
Evaluation Conditionals-WE3-P1
4.8.1
4.8.1
Exercises
4.9
Sequential If-Else Statements
4.9.1
4.9.2
1: Diagram which statements go together by indentation.
4.9.3
SG2: For conditional, determine whether expression is true
4.9.4
3. If true, follow true branch; If false, follow next elif/else branch or exit conditional if no else branch
4.9.5
SG2: For if statement, determine whether true or false
4.9.6
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.10
Evaluate Conditionals WE5-P1
4.10.1
4.10.1
Exercises
4.11
Nested If Statements
4.11.1
4.11.2
SG1: Diagram which statements go together.
4.11.3
SG2: For if statement, determine whether true or false
4.11.4
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.11.5
SG2: For if statement, determine whether true or false
4.11.6
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.11.7
SG2: For if statement, determine whether true or false
4.11.8
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.12
Evaluation Conditionals-WE5-P1
4.12.1
4.12.1
Exercises
4.13
Nested If/Else Statements
4.13.1
4.13.2
SG1: Diagram which statements go together.
4.13.3
SG2: For if statement, determine whether true or false
4.13.4
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.13.5
SG2: For if statement, determine whether true or false
4.13.6
SG3: If true, follow true branch. If false, follow else branch (OR do nothing if there is no else branch).
4.13.7
Practice Pages
4.14
Evaluation Conditionals-WE6-P1
4.14.1
4.14.1
Exercises
5
Write Conditional
5.1
Write Conditional
5.1.1
5.1.2
1. Define how many mutually exclusive paths are needed
5.1.3
2. Order paths from most restrictive to least restrictive
5.1.4
3. Write conditional statement with Boolean expression
5.1.5
4. Follow with true path including action in indentation
5.1.6
5. Repeat 3 and 4 until all paths are included
5.1.7
6. (Optional) Follow with else path including action in indentation
5.2
WriteConditional-WE2-P1
5.2.1
WrCond-WE2-P1
5.2.1
Exercises
5.3
Assessment: Conditionals
5.3
Exercises
6
Evaluate Loops
6.1
While Counter
6.1.1
6.1.2
Determine loop components
6.1.3
Trace the loop, writing updated values for every iteration or until you identify the pattern
6.2
Evaluate Loops-WE1-P1
6.2.1
Evaluate Loops-WE1-P1
6.2.1
Exercises
6.3
For Loop Range
6.3.1
6.3.2
Determine loop components
6.3.3
Trace the loop, writing updated values for every iteration or until you identify the pattern
6.4
Evaluate Loops-WE2-P1
6.4.1
Evaluate Loops-WE2-P1
6.4.1
Exercises
6.5
Complex Conditional
6.5.1
6.5.2
Determine loop components
6.5.3
Trace the loop, writing updated values for every iteration or until you identify the pattern
6.6
Evaluate Conditionals-WE3-P1
6.6.1
Evaluate Loops-WE3-P1
6.6.1
Exercises
6.7
While Loops Sentinel
6.7.1
6.7.2
Determine loop components
6.7.3
Trace the loop, writing updated values for every iteration or until you identify the pattern
6.8
Evaluate Loops-WE4-P1
6.8.1
Evaluate Loops-WE4-P1
6.8.1
Exercises
6.9
For Loops with Lists
6.9.1
6.9.2
Determine loop components
6.9.3
Trace the loop, writing updated values for every iteration or until you identify the pattern
6.10
Evaluate Loops-WE5-P1
6.10.1
Evaluate Loops-WE5-P1
6.10.1
Exercises
6.11
Nested Loops
6.11.1
6.11.2
Determine loop components
6.11.3
SG2: Trace the loop, writing updated values for every iteration or until you identify the pattern
6.11.4
SG1: Determine loop components
6.11.5
SG2: Trace the loop, writing updated values for every iteration or until you identify the pattern
6.12
Evaluate Loops-WE6-P1
6.12.1
Evaluate Loops-WE6-P1
6.12.1
Exercises
7
Write Loop
7.1
Write Loops
7.1.1
7.1.2
1. Determine purpose of loop to pick loop structure (for, while)
7.1.3
2. Define variables before loop that have dependencies within the loop
7.1.4
3. Based on loop structure
7.1.5
4. Write loop body
7.2
WriteLoops-WE5-P1
7.2.1
WriteLoops-WE1-P1
7.2.1
Exercises
7.3
Assessment: Writing Loops
7.3
Exercises
8
Use Library
8.1
Use Math
8.1.1
8.1.2
1. Import module or function (if needed)
8.1.3
2. Determine whether parameters are appropriate for function
8.1.4
3. Determine what the function will return (i.e., data type), print, and/or change state of arguments and where it will be stored (nowhere, somewhere)
8.1.5
4. Evaluate expression as necessary
8.2
Use Library-WE1-P1
8.2.1
Use Library-WE1-P1
8.2.1
Exercises
8.3
Assessment: APIs
8.3
Exercises
9
Evaluate Functions
9.1
Variables Call
9.1.1
9.1.2
1. Create stack frame for global variables
9.1.3
2. Ensure function is defined before function call before beginning body of function
9.1.4
3. Determine parameter values based on positional arguments, keyword arguments, and default values to initialize local variables
9.1.5
4. Use stack frame for function to trace local variables
9.1.6
5. At return to call site, pass values back to call site
9.1.7
6. Delete stack frame with local variables after return to call site
9.1.8
Answer
9.2
Evaluate Functions-WE1-P1
9.2
Exercises
9.3
Evaluate Functions
9.3.1
Simple Call
9.3.2
Keyword Arguments
9.3.3
Nested Calls
9.3.4
Calls within Calls
9.4
Evaluate Functions-WE2-P1
9.4
Exercises
10
Write Function
10.1
Average Numbers
10.1.1
10.1.2
1. Define and initialize global variables
10.1.3
2. Write function header with function name and parameters (must include () even without parameters)
10.1.4
3. Write function body
10.1.5
4. Determine what to return, if anything, to call site
10.1.6
5. Call function with appropriate arguments
10.2
WriteFunction-WE1-P1
10.2
Exercises
10.3
Assessment: Functions
10.3
Exercises
11
Evaluate Lists
11.1
Worked Example: Lists - Instantiate and Alter
11.1.1
11.1.2
SG1: Declaring and initializing a list
11.1.3
SG2: Determine access or action
11.1.4
11.1.5
11.1.6
11.1.7
11.1.8
11.1.9
Practice Pages
11.2
Lists-WE1-P1
11.2.1
11.2.1
Exercises
11.3
Worked Example: Lists - Traverse
11.3.1
11.3.2
SG1: Declaring and initialization of list
11.3.3
SG2: Determine access or action
11.3.4
SG7: Traversing the list
11.3.5
SG5: Change array element
11.3.6
Practice Pages
11.4
Lists-WE2-P1
11.4.1
11.4.1
Exercises
11.5
Lists-WE2-P2
11.5.1
11.5.1
Exercises
11.6
Worked Example: Lists - Reverse Traverse
11.6.1
11.6.2
SG1: Declaring and initialization a List
11.6.3
SG2: Determine access or action
11.6.4
SG8: Passing a list as an argument
11.6.5
SG7: Traversing the list
11.6.6
SG5 and SG3: Changing and accessing elements
11.6.7
SG7: Traversing the List
11.6.8
Practice Pages
11.7
Lists-WE3-P1
11.7.1
11.7.1
Exercises
11.8
Assessment: Lists 1
11.8
Exercises
11.9
Worked Example: Lists - Sum
11.9.1
11.9.2
SG1: Declaring and initialization of list
11.9.3
SG2: Determine access or action
11.9.4
Evaluating code
11.9.5
Practice Pages
11.10
Lists-WE4-P1
11.10.1
11.10.1
Exercises
11.11
Worked Example: Lists - Average
11.11.1
11.11.2
SG1: Declaring and initialization of list
11.11.3
SG2: Determine access or action
11.11.4
Evaluating code
11.11.5
Practice Pages
11.12
Lists-WE6-P1
11.12.1
11.12.1
Exercises
11.13
Worked Example: Lists - Minimum Value
11.13.1
11.13.2
SG1: Declaring and initialization of list
11.13.3
SG2: Determine access or action
11.13.4
Evaluating code
11.13.5
Practice Pages
11.14
Lists-WE5-P1
11.14.1
11.14.1
Exercises
11.15
Worked Example: Lists - Find Value
11.15.1
11.15.2
SG1: Declaring and initialization of list
11.15.3
SG2: Determine access or action
11.15.4
Evaluating code
11.15.5
Practice Pages
11.16
Lists-WE7-P1
11.16.1
11.16.1
Exercises
11.17
Assessment: Lists 2
11.17
Exercises
12
Write Lists
12.1
Worked Example: Writing Lists - Storing Multiplication Table
12.1.1
12.1.2
SG1: Instantiating a list variable
12.1.3
SG5: Traversing a list
12.1.4
SG4: Changing the value of a list element
12.1.5
12.1.6
Practice Pages
12.2
Writing-Lists-WE1-P1
12.2.1
12.3
Worked Example: Writing Lists - Shifting List Values
12.3.1
12.3.2
SG1: Instantiating a list variable
12.3.3
SG4: Adding or changing value of a list element
12.3.4
12.3.5
Practice Pages
12.4
Writing-Lists-WE2-P1
12.4.1
12.4.1
Exercises
1
Demographic Survey
2
Evaluate Expressions
3
Write Expression
4
Evaluate Conditionals
5
Write Conditional
6
Evaluate Loops
7
Write Loop
8
Use Library
9
Evaluate Functions
10
Write Function
11
Evaluate Lists
12
Write Lists
🔗