Search for tag: "problem"

Lesson 26.6 Mutable While-Loops

In this video we show that the one place we typically prefer while-loops is when we are modifying a list or other mutable iterable. While we did see how to do this with for-loops (by looping over…

From  Hannah Lee on November 12th, 2020 3 plays

Lesson 26.1 The While-Loop

In this video we talk about the while-loop and explain why it is necessary. In particular, there are types of iteration that are not possible with the for-loop.

From  Hannah Lee on November 12th, 2020 6 plays

Lesson 25.6 Complex Custom Error Types

When we were recording the video on custom error types, it ran quite long. So we decided to break it up into a second video. In this video we look at a slightly more complicated error type. We also…

From  Hannah Lee on November 12th, 2020 25 plays

Lesson 25.2 Error-Specific Recovery

In this video we show how to use the error type to give you more control over a try-except statement. You can chose to recover from some errors, while completely ignoring other errors.

From  Hannah Lee on November 12th, 2020 33 plays

Lesson 24.1 Strict Typing

Whenever we have enforced preconditions, we have always used the type function. In this video we show why that is a problem, particularly when we want to use an object argument that is a subclass of…

From  Hannah Lee on November 12th, 2020 23 plays

Lesson 22.8 Subclass Initializers

In this video we show that thte primary purpose of the super function is in the initializer method of the subclass. That is because we cannot guarantee that all of the attributes for the parent class…

From  Hannah Lee on November 8th, 2020 29 plays

Lesson 21.4 Invariant Enforcement

We know how to enforce preconditions, but how do we force invariants for our attributes? As we see in this video, we do it much the same as for preconditions. But that is because we are going to…

From  Hannah Lee on October 30th, 2020 50 plays

Digital Life Seminar | Urban Tech Hub

Anthony Townsend (Host), and Gary Johnson, Molly Turner and Ren Yee.

From  Michael Byrne on October 28th, 2020 15 plays

10.20 Theory Seminar - Fall 2020: Yanyi Liu, Cornell University

Zoom Recording ID: 97470844866 UUID: Rc1xL+sZRbmcGWwApOSxiQ== Meeting Time: 2020-10-19T20:00:54Z

From  Jordan Staiti on October 19th, 2020 10 plays

Zoom Oct. 15. For-Loops

In this session, we review the for-loop, which is the next control structure. This is the last control structure we will need for a while.For-loops are pretty easy to use in Python, and most students…

From  Hannah Lee on October 19th, 2020 6 plays

Lesson 17.10 Recursion and Helper Functions

Divide-and-conquer is not the only example of recursion. It just happens to be one of the most interesting. But in this video we show that even some of the simplest of recursive definitions become…

From  Hannah Lee on October 19th, 2020 32 plays

Lesson 17.5 Divide and Conquer Design

Now that we understand divide-and-conquer, it is type to implement it in Python. In this video we show you a three-step sequence for writing a function definition using this technique.

From  Hannah Lee on October 19th, 2020 42 plays

Lesson 17.4 Divide and Conquer

Recursion has many, many uses. But one of the most popular applications is divide-and-conquer. In this video we introduce this new concept and show how we will use to solve several problems on…

From  Hannah Lee on October 19th, 2020 44 plays

Lesson 16.6 Mutable For-Loops

Lists are mutables and support mutable functions. Many of these mutable functions contain for-loops. As we show in this video, this changes how we write the for-loop. In particular, we will not use…

From  Hannah Lee on October 19th, 2020 23 plays

Lesson 16.1 The For-Loop

In this video we introduce a new control-structure: the for-loop. This control structure is specifically designed for processing iterable types like strings, tuples, and lists.

From  Hannah Lee on October 19th, 2020 29 plays