Search for tag: "loop"

Zoom Oct. 15. For-Loops

In this session, we review the for-loop, which is the next control structure. This is the last control structure we will need for a while.For-loops are pretty easy to use in Python, and most students…

From  Hannah Lee on October 19th, 2020 4 plays

Lesson 17.7 The Division Step

Up until now, we have claimed that it does not matter how you divide your date in divide-and-conquer. In this video we show one of the ways in which it might matter. In particular, not thinking about…

From  Hannah Lee on October 19th, 2020 17 plays

Lesson 17.6 Divide and Conquer Visualization

Just because you know how to write a divide-and-conquer algorithm does not mean you understand it. In this video we try to improve our understanding by visualizing divide-and-conquer. When we do this…

From  Hannah Lee on October 19th, 2020 16 plays

Lesson 16.8 Tuple Expansion (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. You might have noticed that some functions, like max can take an arbitrary number of arguments. In…

From  Hannah Lee on October 19th, 2020 3 plays

Lesson 16.7 For-Loops and Testing

Another 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 on October 19th, 2020 13 plays

Lesson 16.6 Mutable For-Loops

Lists are mutables and support mutable functions. Many of these mutable functions contain for-loops. As we show in this video, this changes how we write the for-loop. In particular, we will not use…

From  Hannah Lee on October 19th, 2020 13 plays

Lesson 16.5 Positional For-Loops

Sometimes we need to perform a calculation on a string, list, or tuple, but we do not want to loop over this value. Instead, we want to loop over the positions of the value. In this video we show why…

From  Hannah Lee on October 19th, 2020 17 plays

Lesson 16.4 Range-Based For-Loops

Strings, lists, and tuples are not the only iterable types. In this video we introduce the range function, which creates another iterable value. This is going to allow us to do several things that we…

From  Hannah Lee on October 19th, 2020 18 plays

Lesson 16.3 Accumulators

One of the techniques that we say in the previous video was the accumulator variable. In this video we show that this is a general technique used in a fruitful function that requires a for-loop.

From  Hannah Lee on October 19th, 2020 16 plays

Lesson 16.2 For-Loop Design

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.

From  Hannah Lee on October 19th, 2020 16 plays

Lesson 16.1 The For-Loop

In this video we introduce a new control-structure: the for-loop. This control structure is specifically designed for processing iterable types like strings, tuples, and lists.

From  Hannah Lee on October 19th, 2020 15 plays

General Fusion meeting

From  Laura Ricciuti on September 20th, 2019 16 plays