Skip to content

Lesson 6 (More on Functions)

Courtney Frey edited this page Apr 13, 2022 · 2 revisions

Lesson 6: More on Functions

In the prep work for this lesson, the students learned:

  1. What an anonymous function is and how to write one.
  2. What recursion is and how a function can call itself.

Announcements

  1. More info to come... when in doubt, check with the class Candidate Engagement Manager for announcements!

For Part-Time Students:

  1. The second graded assignment is open for you to start working on. Even if you can't solve everything right away, it is important to start working on it since you only have 2 weeks to do it!

For Full-Time Students:

  1. Welcome to Day 8!
  2. Graded Assignment 1 is due at the end of class today

Large Group Time (Instructor)

Lesson 6 Topics That Require Careful Attention

  1. Conversation Starters:
    1. What type of error occurs when attempting to use a value that is NOT a function as if it were one?
    2. Explain the difference between named and anonymous functions, including an example of how an anonymous function can be used.
  2. Reinforce examples of when and why someone may use an anonymous function. Live coding examples are particularly helpful in explaing anonymous functions.
  3. Reinforce examples of when and why someone may choose the recursive solution. While recursion is in the chapter, it should NOT receive a large amount of emphasis. At this point in the students' learning journey recursion pushes against the boundary between an engaging challenge and a discouraging frustration.
  4. Q & A about the chapter exercises.

Studio (TF Notes)

Lesson 6 Studio

  1. Remind students about how important it is to write a sorting function yourself. The last section of the studio instructions has a lot of really good points about how sorting functions serve as the basis for many technical interview questions.