|
In the previous video, we said that generators are a type of coroutine. In this video, we explore this idea. We use yield statements to write generators that are a little more sophisticated than…
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
This video is not optional because the material is advanced. It is optional because this video series has run long and this topic is less important for you to know. While we have not talked about…
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
This video is not optional because the material is advanced. It is optional because this video series has run long and this topic is less important for you to know. When we are done with out…
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
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.
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Now that we know how generators work, it is time to write our own. In this video we show how easy it is. We just take out experience with the accumulator pattern and replace the accumulator with a…
Content Categories
Instructional Recordings Creation Date
December 04, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
We can always replace for-loops with while-loops, but should we? In this video we talk about the trade-offs of the two control structures and why it might be better to use over the other.
Content Categories
Instructional Recordings Creation Date
November 12, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
While-loops require additional patterns beyond the simple accumulator pattern that we used in for-loops. In this video, we talk about the first such pattern, which is replacing the range iterator.…
Content Categories
Instructional Recordings Creation Date
November 12, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
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…
Content Categories
Instructional Recordings Creation Date
November 12, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
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…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Since we can loop over dictionaries, that means we probably want to use them in functions with accumulators. In this video we show how to do this and why they are not that much different from lists.
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
In this video we show how to write an immutable function on a table of data. In most ways this is no different than writing an immutable function on a list. Except that this time we may need multiple…
Content Categories
Instructional Recordings Creation Date
October 27, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
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…
Content Categories
Instructional Recordings Creation Date
October 19, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
Abkhazian Searchable
Yes Searchable On
Cornell Web Search
|
|
Just because you know how to write a divide-and-conquer algorithm does not mean you understand it. In this video we try to improve our understanding by visualizing divide-and-conquer. When we do this…
Content Categories
Instructional Recordings Creation Date
October 19, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
This video introduces an advanced topic that is completely optional and will not appear on any exam. You might have noticed that some functions, like max can take an arbitrary number of arguments. In…
Content Categories
Instructional Recordings Creation Date
October 19, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
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…
Content Categories
Instructional Recordings Creation Date
October 19, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|
|
Sometimes we need to perform a calculation on a string, list, or tuple, but we do not want to loop over this value. Instead, we want to loop over the positions of the value. In this video we show why…
Content Categories
Instructional Recordings Creation Date
October 19, 2020 Creator 1 First Name
Walker Creator 1 Last Name
White Creator 1 Role
Faculty or Staff Member Creator 1 NetID
wmw2 Language
English Searchable
Yes Searchable On
Cornell Web Search
|