Search for tag: "call"

Zoom Dec. 3. Generators

In this presentation we will review, generators which lead into the last major topic of the course (coroutines). Once again, this will involve a lot of visualization.We also start off this…

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 29.2 Coroutines

In the previous video we introduced the term coroutine but did not actually define it. In this video we give a more concrete definition. As a result, we see that coroutines and generators have a lot…

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 28.6 map and filter

In this video we talk about two very famous generators: map and filter. We show how to use these to replace writing code with a for-loop.

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 28.4 Generator Visualization

Generators look like normal functions, but they do not behave like them. In this video we show how to visualize them, using the Python Tutor.

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 28.3 The yield Statement

Making iterator classes is hard. In this video, we show an alternative, allowing us to write the iterator as a ‘function”. This requires the addition of a new python statement, the yield…

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 27.2 Animation Frames

The while-loop that drives the game is hidden. This is going to create some interest challenges, particularly when you need variables that carry over from animation frame to animation frame. In this…

From  Hannah Lee on November 30th, 2020 22 plays

Lesson 25.3 Error Types and the Call Stack

After the last video, try-except looks less like an if-else statement and more like an if-elif-else statement. As we see in this video, this has profound effects on how errors interact with the call…

From  Hannah Lee on November 12th, 2020 37 plays

Zoom Nov. 5. Inheritance

In this presentation, we continue with several of the classes that we worked on last time. But this time, we create subclasses of them.On the exam, the class question will always be a two-parter. One…

From  Hannah Lee on November 8th, 2020 3 plays

Lesson 23.2 Operator Overloading

In this video we introduce the primary tool for abstraction in Python. Operator overloading allows us to define additional meanings for any built-in symbol such as + or *. Because Python uses the…

From  Hannah Lee on November 8th, 2020 38 plays

Zoom Oct. 29. Classes

In this presentation, we review the class definition. We look at both the syntax (what must be present for the definition to work) and the semantics (how it is processed in Python).Most of this class…

From  Hannah Lee on October 30th, 2020 7 plays

Zoom Oct. 27. Nested Lists and Dictionaries

This presentation explores the last built-in (as opposed to user-defined) types in this course. These types are often used to store data in files.We actually had an (accidental) sneak peak at these…

From  Hannah Lee on October 27th, 2020 7 plays

Zoom Oct. 22. More Recursion

The divide-and-conquer examples we saw in the previous session were on the easy side. In this session we look at some much more challenging examples.Included in this session is segregate, the most…

From  Hannah Lee on October 27th, 2020 5 plays

Zoom Oct. 20. Recursion

Recursion is a powerful programming tool and one of the fundamental principles of computer science. It is used in many advanced algorithms.In this session, we will just focus on divide-and-conquer,…

From  Hannah Lee on October 27th, 2020 10 plays

Lesson 20.9 Optional Arguments

Unlike other programming languages, a Python class has only one constructor, If we want to give the user more flexibility when creating objects, we should make certain arguments optional. In this…

From  Hannah Lee on October 27th, 2020 32 plays

Lesson 20.7 Intializers

In this video, we introduce the most important method definition in any class: the initializer. The initializer is responsible for creating all the attributes so that the user does not need to worry…

From  Hannah Lee on October 27th, 2020 39 plays

Lesson 20.6 Method Visualization

Methods definitions look just like function definitions, but we call them differently. In this video we show how to visualize a method call, and we see just how it differs from a function call.

From  Hannah Lee on October 27th, 2020 36 plays