|
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.
|
|
We have a new control structure, so it is time once again to talk about testing. In this video we revisit the concept of code coverage and show testing a try-except is very similar to testing a…
|
|
Try-except statements will allow use to write functions that we could not write with conditional statements. In this video, we show how to use try-except as a general programming tool.
|
|
In this video we intrduce a new control structure: the try-except statement. As we will see, it looks very similar to an if-else statment with some important differences.
|
|
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.
|
|
When you work on Assignment 3, you will discover that the color objects have some significant restrictions on how they can be used. These restrictions are called attribute invariants, and they are…
|
|
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…
|
|
The one thing that we have not talked about yet are the preconditions in a specification. However, as this video shows, they are arguably the most important part of the specification. They are what…
|
|
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…
|
|
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…
|
|
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.
|
|
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.
|
|
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…
|
|
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…
|