Search for tag: "helper"
Lesson 30.7 QuicksortThe partition algorithm breaks up the list into two kind-of-sorted portions. In this video, we show how to use this fact with divide-and-conquer to implement a new sorting algorithm: quicksort. For…
From Hannah Lee
40 plays
|
|
Lesson 30.3 Insertion SortIn this video we introduce insertion sort, which is one of the simplest sorting algorithms to understand. If you have ever sorted cards in your hand it is likely that you have used this sorting…
From Hannah Lee
46 plays
|
|
Lesson 29.8 Native Coroutines (OPTIONAL)This video introduces an advanced topic that is completely optional and is not relevant to the final assignment. If you Google Python and coroutines, you will get something very different than what…
From Hannah Lee
24 plays
|
|
Lesson 29.5 Timed AnimationOur primary application of coroutines in the final assignment is timed animations. In this video we talk about what these are and how to design them with the GameApp class.
From Hannah Lee
63 plays
|
|
Lesson 27.8 Application DesignGame applications (and graphical applications in general) can get pretty complicated. In this video we talk about how to break up your code to make it more readable and more manageable. In some…
From Hannah Lee
60 plays
|
|
Lesson 27.6 Application StateEven though you only need to implement three methods in GameApp subclass, this methods will eventually get very long. In this video we introduce the concept of application state, and talk about how…
From Hannah Lee
67 plays
|
|
Lesson 25.6 Complex Custom Error TypesWhen we were recording the video on custom error types, it ran quite long. So we decided to break it up into a second video. In this video we look at a slightly more complicated error type. We also…
From Hannah Lee
67 plays
|
|
Lesson 23.5 Mixed-Type OperatorsOperator 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…
From Hannah Lee
77 plays
|
|
Lesson 23.2 Operator OverloadingIn this video we introduce the primary tool for abstraction in Python. Operator overloading allows us to define additional meanings for any built-in symbol such as + or *. Because Python uses the…
From Hannah Lee
86 plays
|
|
Lesson 22.8 Subclass InitializersIn this video we show that thte primary purpose of the super function is in the initializer method of the subclass. That is because we cannot guarantee that all of the attributes for the parent class…
From Hannah Lee
79 plays
|
|
Lesson 22.7 The super FunctionSometimes you do not want to completely override a method. You just want to override part of it, or add a few extra features at the end. In this video, we introduce the super function which allows us…
From Hannah Lee
83 plays
|
|
Lesson 22.6 Method OverridingSubclasses inherit all of the methods of their parent. But suppose you do not want to use the inherited version of a method, but want to define a new one instead? In this video we talk about the…
From Hannah Lee
83 plays
|
|
Lesson 20.10 Representation MethodsWhen we first introduced objects, we talked about the concept of object representation. But how does Python know how to use this representation. In this video, we see that this is the result of…
From Hannah Lee
82 plays
|
|
Lesson 17.10 Recursion and Helper FunctionsDivide-and-conquer is not the only example of recursion. It just happens to be one of the most interesting. But in this video we show that even some of the simplest of recursive definitions become…
From Hannah Lee
337 plays
|
|
Zoom Oct. 8. Asserts and Error HandlingIn this session we review how we read error messages in Python. We also show how to both create errors and how to recover from them.Once again, we will spend a significant amount of this class on…
From Hannah Lee
25 plays
|
|
Lesson 13.6 Assert HelpersSometimes we absolutely need to enforce all of our preconditions, and we cannot live with the compromises of the previous video. In this video we show how to use top-down design to give us more…
From Hannah Lee
75 plays
|