Search for tag: "float"
Lesson 25.2 Error-Specific RecoveryIn 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
71 plays
|
|
Lesson 14.4 Try-Except and TestingWe 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…
From Hannah Lee
64 plays
|
|
Lesson 14.2 Functions with Try-ExceptTry-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.
From Hannah Lee
69 plays
|
|
Lesson 14.1 Try-Except StatementsIn 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.
From Hannah Lee
91 plays
|
|
Lesson 12.1 Objects EverywhereThe 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.
From Hannah Lee
106 plays
|
|
Lesson 11.6 Attribute InvariantsWhen 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…
From Hannah Lee
118 plays
|
|
Lesson 7.4 Preconditions CategoriesIn 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
78 plays
|
|
Lesson 7.3 PreconditionsThe 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…
From Hannah Lee
82 plays
|
|
Lesson 3.1 Built-In FunctionsThe 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…
From Hannah Lee
158 plays
|
|
Lesson 2.4 Dynamic TypingIf 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…
From Hannah Lee
121 plays
|
|
Lesson 2.2 Assignment StatementsNow 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
134 plays
|
|
Lesson 2.1 Notion of a VariableVariables 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.
From Hannah Lee
143 plays
|
|
Lesson 1.7 Mixed ExpressionsFor 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…
From Hannah Lee
176 plays
|
|
Lesson 1.3. Float ExpressionsIntegers 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…
From Hannah Lee
173 plays
|