Search for tag: "frame"

Lesson 17.8 Recursion Performance

In this video, we show another reason to pay attention to the division step: performance. In fact, we show an example where a change in how we divide the data can improve performance by several…

From  Hannah Lee on October 19th, 2020 12 plays

Lesson 17.3 Recursion and the Call Stack

Because 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 on October 19th, 2020 17 plays

Lesson 17.2 Recursive Functions

In this video we show how to take recursive definitions from mathematics and implement them in Python. To do this, we will need to have a function call itself in its own definition.

From  Hannah Lee on October 19th, 2020 17 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 12 plays

Zoom Oct. 6. Memory in Python

In this session we take a closer look at the three memory areas of Python. This will help us understand what the Python Tutor is showing when we write more complex programs in the future.The…

From  Hannah Lee on October 10th, 2020 4 plays

Zoom Sep. 24. Conditionals

In this session we review conditionals, focusing on how we visualize them. This will be important for the second assignemnt.Conditional assignments will not be necessary for Assignment 1. In fact,…

From  Hannah Lee on October 10th, 2020 1 plays

Lesson 15.7 Mutable List Functions

Because lists are mutable, just like general objects, we can modify them in the body of a function. In this video we show how to write mutable list functions, which are (typically) procedures that…

From  Hannah Lee on October 10th, 2020 13 plays

Lesson 14.3 Try-Except and the Stack

The except-portion of an try-except statement is only executed when there is an error/crash. But, as we have seen, errors can occur anywhere in the call stack. In this video we show how try-except…

From  Hannah Lee on October 10th, 2020 14 plays

Lesson 13.1 Error Messages

Most of you have seen error messages already, working on the course assignments. But what do these error messages mean? As we seen in this video, we could not really talk about them until now because…

From  Hannah Lee on October 10th, 2020 9 plays

Lesson 12.7 The Call Stack

In this video we look at the call stack in much more detail. In particular, we see that is possible to have more than one call frame active at a time, and the stack is the way these frames are…

From  Hannah Lee on October 2nd, 2020 13 plays

Lesson 12.6 Global Variables

With both modules and function definitions, we saw that global variables are incredibly important. But most of our code is inside of function definitions, and therefore executed inside of call…

From  Hannah Lee on October 2nd, 2020 11 plays

Lesson 12.5 Functions as Variables

If function definitions are objects, then that means we can compute with them like any other object. In this video we show what happens when we assign a function definition to a variable, or why we…

From  Hannah Lee on October 2nd, 2020 11 plays

Lesson 12.2 Memory Areas

In this video we introduce the three regions of memory in Python: global space, the heap, and the call stack. We need all of these to understand how Python executes code.

From  Hannah Lee on October 2nd, 2020 12 plays

Lesson 11.7 Mutable Functions

In the past if we wanted to do any significant computation, we needed a a fruitful function. Procedures are limited to testing or printing stuff out on the screen. But in this video we show how we…

From  Hannah Lee on October 2nd, 2020 6 plays

Lesson 9.7 Conditionals & Local Variables

Python is unlike other languages in that it does not have a traditional notion of scope. You can create a variable inside of conditional, but still access that same variable outside of the…

From  Hannah Lee on September 24th, 2020 3 plays

Lesson 9.6 Conditionals & Call Frames

Conditionals are typically used inside of function definitions. So how do they affect the way that we draw call frames. We address this issue in this video. You should pay close attention to the…

From  Hannah Lee on September 24th, 2020 5 plays