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…

+19 More
From  Hannah Lee 61 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.…

+19 More
From  Hannah Lee 81 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…

+19 More
From  Hannah Lee 119 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.

+19 More
From  Hannah Lee 129 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,…

+19 More
From  Hannah Lee 90 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.

+19 More
From  Hannah Lee 83 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.

+19 More
From  Hannah Lee 85 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.

+19 More
From  Hannah Lee 84 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 29 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…

+19 More
From  Hannah Lee 106 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…

+19 More
From  Hannah Lee 99 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.

+19 More
From  Hannah Lee 161 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.

+19 More
From  Hannah Lee 123 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…

+19 More
From  Hannah Lee 139 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…

+19 More
From  Hannah Lee 158 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…

+19 More
From  Hannah Lee 178 plays