Search for tag: "x"

Lesson 29.4 The yield Statement

While generators are coroutines, the communication only goes one way: from the child to the calling parent. In this video we show how to reverse this communication, passing down information from the…

From  Hannah Lee on December 3rd, 2020 0 plays

Lesson 26.2 While-Loop Traces

While-loops can do everything that a for-loop can (and more) but they are much harder to use. That is why, in this video, we talk about how to debug a while-loop before we talk about how to write…

From  Hannah Lee on November 12th, 2020 34 plays

Lesson 18.4 Nested Slicing

Slicing a list creates a copy. In this video we show what this means for nested lists. In particular, we show that sometimes a copy is not really a copy after all, and that we have to distinguish…

From  Hannah Lee on October 27th, 2020 28 plays

Lesson 18.1 List of Objects

Lists require that we explicitly show the folder when visualize them. In this video we show what that means when a list contains other objects that have their own folders. The result is a chain of…

From  Hannah Lee on October 27th, 2020 22 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 15.5 Slice Visualization

Because lists are mutable, we need to explicitly draw their folder when we visualize them. In this video we show how slicing affects these folders.

From  Hannah Lee on October 10th, 2020 18 plays

Lesson 15.3 List Expressions

In this video we introduce the list, which looks almost exactly the the same as a tuple, except that it is written differently. Indeed, it supports many of the same operations as tuples. Together,…

From  Hannah Lee on October 10th, 2020 16 plays

Lesson 15.1 Tuple Expressions

In this video we introduce the first new sliceable type, the tuple. We show why we need this new type, and why it is more flexible than a string.

From  Hannah Lee on October 10th, 2020 16 plays

Lesson 9.4 If-Elif Statements

In this video we introduce the final conditional statement, the if-elif-else statement. This allows you to chose between an arbitrary number of options.

From  Hannah Lee on September 24th, 2020 7 plays

Lesson 9.3 If-Else Statements

In this video we introduce the if-else statement. It is like the if statement, except that you now chose between two options.

From  Hannah Lee on September 24th, 2020 8 plays

Lesson 7.4 Preconditions Categories

In this video, we break our preconditions up into categories. The primary reason for this is to help us analyze a specification. It will also become extremely imporant when we talk about enforcement…

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 5.5 Function Visualization

Once again, visualization is an important skill in this couse. In this video we show what it is even more important for functions. In particular, we introduce the new topic of the call frame, which…

From  Hannah Lee on September 11th, 2020 11 plays

Lesson 4.6 Interactive Scripts

Right now, we do not know a lot of Python commands, and so our scripts are pretty boring. But we can make them a lot more interesting with a function that we have already seen: the input function. In…

From  Hannah Lee on September 9th, 2020 12 plays

Lesson 4.1 Modules

In this video we talk about what a module really is, and why it is so important for us to have them in this course. We show how to make our own modules and how to import them. In this video it will…

From  Hannah Lee on September 9th, 2020 18 plays

Lesson 2.3 Sequential Execution

Now that we have assignment statements, it is time to move beyond the simple calculator model of Python. As we see in this video, the order in which we type Python commands matters.

From  Hannah Lee on September 7th, 2020 7 plays

Lesson 2.2 Assignment Statements

Now that we have some idea of what a variable is, it is time to start creating them. We do that with assignment statements, which are the subject of this video.

From  Hannah Lee on September 7th, 2020 9 plays