Skip to content

Latest commit

 

History

History
83 lines (63 loc) · 4.92 KB

lesson_26.md

File metadata and controls

83 lines (63 loc) · 4.92 KB

Lesson 2.6: Combining Variables

Learning Objectives

Students will be able to...

  • Combine loops with conditionals to create models with repeated but conditional behavior

Materials/Preparation

Pacing Guide

Duration Description
5 minutes Welcome, attendance, bell work, announcements
10 minutes Review, lecture and introduce activity
30 minutes Gravity activity
10 minutes Review and wrap-up

Instructor's Notes

  1. Review and lecture
    1. Review loops and conditionals
      • Ask students what loops do, when they are useful, and what loops exist in SNAP
        • loops cause code to execute multiple times
        • loops can help reduce redundancy and increase readability
        • SNAP contains three loops: repeat, forever, and repeat until
      • Ask students what conditionals are for and when they are useful
        • conditionals are used to execute a block of code only under certain circumstances
      • Encourage discussion about previous activities
      • Fill in understanding gaps when necessary
    2. Demonstrate combining loops and conditionals
      • Present and
      • Ask students to suggest when these constructs might be useful
        • "repeat until" is useful when a loop needs to run not for a set number of iterations, but until some situation occurs
        • "forever if" is useful when code should execute any time a condition is true, for the duration of the program
      • Point out that the condition in "repeat until" is a termination condition, while in "forever-if" it is a continuation condition
    3. Introduce the concept of modeling
      • modeling: building a system to simulate the behavior of a real-life phenomenon by simplifying or ignoring certain details
      • Ask students to suggest systems or concepts that might need to be modeled
      • Discuss important considerations when designing and implementing a model
        • Lead students to realize that most sacrifice some amount of accuracy or realism for simplicity
  2. Activity
    • Students should complete "What Goes Up..." lab individually
      • Mention that the code written in this lab will be helpful for the Platform Game project
  3. Debrief

BJC Lecture Suggestions

####Good for Classroom Instruction

####Background Information for Instructors

  • Demystification Lecture-Novel Interaction techniques(emotive systems) 00:00-2:30

Accommodations/Differentiation

  • Take care to ensure that all students have functional code by the end of the lab to avoid putting some students at a disadvantage starting the project
    • If many students struggle, consider releasing your own solution after the lab has been completed in class
    • Utilize TAs and advanced students to assist struggling students—it is vital that all students complete this lab in advance of starting the project
  • Advanced students can consider increasing the realism of their gravity model by adding acceleration and/or beginning to implement jumping

Forum discussion

Lesson 2.6 Combining Loops and Conditionals (TEALS Discourse account required).