Search for tag: "assignment"

Zoom Oct. 29. Classes

In this presentation, we review the class definition. We look at both the syntax (what must be present for the definition to work) and the semantics (how it is processed in Python).Most of this class…

From  Hannah Lee on October 30th, 2020 0 plays

Lesson 21.6 Immutable Attributes

Getters and setters have another advantage in that they allow us to completely disable to any changes to an attribute. This allows us to separate attributes into mutable and immutable attributes,…

From  Hannah Lee on October 30th, 2020 2 plays

Zoom Oct. 20. Recursion

Recursion is a powerful programming tool and one of the fundamental principles of computer science. It is used in many advanced algorithms.In this session, we will just focus on divide-and-conquer,…

From  Hannah Lee on October 27th, 2020 0 plays

Lesson 20.9 Optional Arguments

Unlike other programming languages, a Python class has only one constructor, If we want to give the user more flexibility when creating objects, we should make certain arguments optional. In this…

From  Hannah Lee on October 27th, 2020 6 plays

Lesson 20.3 Classes and Attributes

The primary role of an object is to store attribute variables. In this video we demonstrate the easiest way to add attributes to an object. We see that we can also add attributes to class folders as…

From  Hannah Lee on October 27th, 2020 8 plays

Lesson 19.7 Mutable Table Functions

Dictionaries are mutables and support mutable functions. But this is a case where dictionaries are slightly different from lists. We are allowed to loop over a dictionary as we modify it, so long as…

From  Hannah Lee on October 27th, 2020 9 plays

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

Lesson 19.2 Dictionary Assignment

Dictionaries are mutable. In this video we show how to alter there contents. This includes reassigning the value of a dictionary for a given key. But it also includes adding and deleting keys.

From  Hannah Lee on October 27th, 2020 8 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 9 plays

Zoom Oct. 13. Lists (and Sequences)

In this session we review the two new sequence data types: tuples, and lists. This is the last material on the first prelim.For the most part these are similar to strings, and so we will do a lot of…

From  Hannah Lee on October 19th, 2020 1 plays

Lesson 17.11 Graphical Recursion

Fractals are shapes that look the same when you magnify them larger and larger. This is another example of recursion. In this video we introduce the drawing turtle and show how we use it to draw…

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

Zoom Oct. 8. Asserts and Error Handling

In this session we review how we read error messages in Python. We also show how to both create errors and how to recover from them.Once again, we will spend a significant amount of this class on…

From  Hannah Lee on October 10th, 2020 6 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.8 Slice Assignment (OPTIONAL)

This video introduces an advanced topic that is completely optional and will not appear on any exam. Lists don’t just allow us to use a single position in an assignment statement. We can also…

From  Hannah Lee on October 10th, 2020 4 plays