Search for tag: "strings"

Lesson 19.4 Nested Dictionaries

In this video we show that we can nest dictionaries just like we nested lists. In fact, a lot of real world data is represented this way. We show off a particularly complicated JSON file that…

From  Hannah Lee on October 27th, 2020 5 plays

Lesson 19.3 Dictionary Visualization

Since dictionaries are mutable, we must represent them with folders. In this video we show what these folders must look like. In doing so, we see that they look suspiciously similar to other folders…

From  Hannah Lee on October 27th, 2020 7 plays

Lesson 19.1 Dictionary Expressions

In this video, we introduce a dictionary as a collection of key-value pairs. We also show how to write a dictionary expression in Python. It looks just like a JSON string, but without the quotes.

From  Hannah Lee on October 27th, 2020 6 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 21 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.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 15.6 List Methods

Lists have many of the same methods as tuples. But since they are mutable, they have even more. In this video we show off some of the mutable methods of lists, which are methods that can alter the…

From  Hannah Lee on October 10th, 2020 12 plays

Lesson 15.2 Complex Tuple Expressions

Tuples are very, very similar to strings. In this video we explore this similarity, showing that they support many of the same operations and methods.

From  Hannah Lee on October 10th, 2020 12 plays

Lesson 15.1 Tuple Expressions

In this video we introduce the first new sliceable type, the tuple. We show why we need this new type, and why it is more flexible than a string.

From  Hannah Lee on October 10th, 2020 12 plays

Lesson 13.4 Assert Messages

We now know how to do assert statements to create errors. But the error messages are a little cryptic. In this video we talk about how we can do a better job.

From  Hannah Lee on October 10th, 2020 9 plays

Lesson 11.8 Object Methods

Objects have an interesting feature that we saw before we strings: they have methods in addition to functions. In this video we talk about those methods, and how they differ from string methods.

From  Hannah Lee on October 2nd, 2020 7 plays

Lesson 10.3 PseudoCode

In this video we introduce pseudocode, which is a step-by-step English description of what we want to do. The goal is provide an outline that we convert into Python later.

From  Hannah Lee on October 2nd, 2020 2 plays

Zoom Sep. 17. Strings

In this class we review how to process text in Python. These techniques we are reinforcing will be used in the first assignment.As part of today’s class, we have provided some additional demo…

From  Hannah Lee on September 24th, 2020 6 plays

Lesson 7.2 Specification Format

Now that you know why specifications are so important, it is time to write them. We have a very specific format that we want for our specifications, which is detailed in this video.

From  Hannah Lee on September 24th, 2020 4 plays

Lesson 6.5 String Processing

The focus of the first assignment will be to write functions that take a string as input and produce a string as output. We sometimes call this (informally) string processing. This can be a daunting…

From  Hannah Lee on September 16th, 2020 8 plays

Lesson 6.4 Advanced String Methods

In the previous video, we showed how to call a string method if it had only one argument – the string. In this video we show you how to call arbitrary string methods, which can have many…

From  Hannah Lee on September 16th, 2020 8 plays