Search for tag: "parentheses"

Lesson 29.4 The yield Statement

While generators are coroutines, the communication only goes one way: from the child to the calling parent. In this video we show how to reverse this communication, passing down information from the…

From  Hannah Lee 59 plays

Lesson 22.3 The object Class

Every class must be a subclass of something, and that parent class goes inside of the parentheses. That means that the word object we have been using in all of class definitions is actually a class.…

From  Hannah Lee 72 plays

Lesson 20.5 Method Definitions

In addition to attributes, objects also have methods. In this video, we show how to add a method definition to a class. For the most part, it is as simple as indenting a function definition inside of…

From  Hannah Lee 107 plays

Lesson 20.1 Class Definitions

In this video we show you the basic format of a class definition. However, classes can contain a lot of features, so our classes will be very simple for this demonstration.

From  Hannah Lee 110 plays

Lesson 15.3 List Expressions

In this video we introduce the list, which looks almost exactly the the same as a tuple, except that it is written differently. Indeed, it supports many of the same operations as tuples. Together,…

From  Hannah Lee 83 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 75 plays

Lesson 12.4 Functions in Memory

We know what happens when we call a function. But as we show in this video, Python also does something very important when we define a function. It has to store the definition somewhere.

From  Hannah Lee 79 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 75 plays

Zoom Sep. 22. Specifications and Testing

Both specifications and testing are critical for the first assignment. But many students struggle with them because they are so “fuzzy”.To help you improve your skills here, we have are…

From  Hannah Lee 28 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 98 plays

Lesson 6.3 String Methods

Strings do not have a lot of functions associated with them. Instead, strings have methods. As we see in this video, methods behave almost exactly like functions, except that the syntax for calling…

From  Hannah Lee 92 plays

Lesson 5.2 Procedures

In this video, we show you how to define a procedure in the Python interactive shell. Recall that a procedure is a function that is used as a command.

From  Hannah Lee 147 plays

Lesson 5.1 Function Terminology

This video series is where we start to pile on the vocabulary. In this video we reveiw the most important vocabulary terms for this series, and show you where to look if you are unsure about a word.

From  Hannah Lee 111 plays

Lesson 3.4 Python Documentation

While this new video/lecture format is allowing us to show you things we could not cover in year’s past, there is a limit to how much we can show you. Sometimes you are just going to need to…

From  Hannah Lee 117 plays

Lesson 3.1 Built-In Functions

The 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 137 plays

Lesson 1.7 Mixed Expressions

For 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 157 plays