|
In this video, we show that we can solve the problem of strict typing by using the isinstance function. This function will be our preferred way for enforcing preconditions going forward.
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
|
|
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…
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
|
|
Operator overloading allows us to redefine the meaning of + or * on objects of our class. But sometimes we want to mix together types like a fraction and integer. In this video we show that it is…
Content Categories
Instructional Recordings Creation Date
November 07, 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 use for-loops in function definitions. In particular, we show that we go from a specification to code that uses a for-loop.
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
|
|
Tuples are very, very similar to strings. In this video we explore this similarity, showing that they support many of the same operations and methods.
Content Categories
Instructional Recordings Creation Date
October 10, 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 know what happens when we call a function. But as we show in this video, Python also does something very important when we define a function. It has to store the definition somewhere.
Content Categories
Instructional Recordings Creation Date
October 01, 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
|
|
The biggest lie that we have told is that there is a difference between classes and the basic types. In this video we show that this is not true, and what ramifications this has for Python.
Content Categories
Instructional Recordings Creation Date
October 01, 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 have said that objects are essentially folders? But the command line cannot display these folders using text. In this video, we talk about what the command line does show when we look at an object…
Content Categories
Instructional Recordings Creation Date
October 01, 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 have to introduce some new terminology. We talk about classes, which are new types that are provided by modules (and therefore not built into Python). Objects are the values for…
Content Categories
Instructional Recordings Creation Date
October 01, 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
|
|
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…
Content Categories
Instructional Recordings Creation Date
September 09, 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
|
|
The easiest functions to use in Python are those that are built into it. They are listed on the Python Documentation page. In this video we examine some of these and show the syntax for how to use…
Content Categories
Instructional Recordings Creation Date
September 09, 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
|
|
If you have programmed before (and it is okay if you have not), you may be used to variables having the restriction that they can only contain specific types. This is not the case in Python, and that…
Content Categories
Instructional Recordings Creation Date
September 07, 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
|
|
Variables are tricky things because they are often invisible. To better understand them, we need to build a mental model of how they work. That is the purpose of this video.
Content Categories
Instructional Recordings Creation Date
September 05, 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
|
|
For the most part, operations are used to combine two expressions of the same type. Adding together two ints is different from adding together two strings. In this video we see what happens when we…
Content Categories
Instructional Recordings Creation Date
September 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
|
|
Integers are not the only number type in Python. There is also the float type, which is the set of real numbers. Floats can do just about everything that integers So why then does Python need a…
Content Categories
Instructional Recordings Creation Date
September 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
|