Search for tag: "loops"
Cantu @ 2022 NNCI REU Convocation2022 NNCI REU Convocation at the University of Louisville, Kentucky; Rodolfo Cantu, 2022 CNF REU Intern with Prof. Amal El-Ghazaly (Cornell)
From Melanie-Claire Mallison
10 plays
|
|
Lesson 30.5 Selection SortIn the previous video we saw that insertion sort is not an ideal sorting algorithm. In this video we try our hand at another algorithm: selection sort. This is another simple algorithm that may be…
From Hannah Lee
38 plays
|
|
Lesson28.8 List Comprehension (OPTIONAL)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…
From Hannah Lee
26 plays
|
|
Lesson 26.8 The Game of PigWith while-loops we can now write some super complex programs – once that we way more sophisticated than what we have done before. In this video we show how to create a complete dice game with…
From Hannah Lee
67 plays
|
|
Lesson 26.6 Mutable While-LoopsIn this video we show that the one place we typically prefer while-loops is when we are modifying a list or other mutable iterable. While we did see how to do this with for-loops (by looping over…
From Hannah Lee
71 plays
|
|
Lesson 26.5 While-Loops vs For-LoopsWe 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.
From Hannah Lee
79 plays
|
|
Lesson 26.3 While-Loop RangesWhile-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.…
From Hannah Lee
79 plays
|
|
Lesson 26.2 While-Loop TracesWhile-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…
From Hannah Lee
86 plays
|
|
Lesson 26.1 The While-LoopIn this video we talk about the while-loop and explain why it is necessary. In particular, there are types of iteration that are not possible with the for-loop.
From Hannah Lee
86 plays
|
|
Zoom Oct. 27. Nested Lists and DictionariesThis 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…
From Hannah Lee
37 plays
|
|
Lesson 18.5 Immutable Table FunctionsIn 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…
From Hannah Lee
79 plays
|
|
Lesson 17.4 Divide and ConquerRecursion has many, many uses. But one of the most popular applications is divide-and-conquer. In this video we introduce this new concept and show how we will use to solve several problems on…
From Hannah Lee
119 plays
|
|
Lesson 17.3 Recursion and the Call StackBecause a recursive function calls itself, it will have multiple call frames on the call stack. In this video we show exactly why we should be concerned about this and why it will affect our function…
From Hannah Lee
153 plays
|
|
Lesson 16.7 For-Loops and TestingAnother control-structure means another video on testing. But if you have following the Rule of Numbers, you will discover that you have enough tests for your for-loop. Instead, as we show in this…
From Hannah Lee
76 plays
|
|