IT 117: Intermediate Scripting
Class 9

Tips and Examples


Review


New Material


Microphone

Graded Quiz

You can connect to Gradescope to take weekly graded quiz today during the last 15 minutes of the class.

Once you start the quiz you have 15 minutes to finish it.

You can only take this quiz today.

There is not makeup for the weekly quiz because Gradescope does not permit it.

Solution to Homework 3

I have posted a solution to homework 3 here.

Let's take a look.

Homework 5

I have posted homework 5 here.

It is due this coming Sunday at 11:59 PM.

Questions

Are there any questions before I begin?

Tips and Examples

Never Assume Your Code Works

An Example of Evaluation in a Boolean Context

Review

Sets in Mathematics

Set Membership

Subsets and Supersets

Union of Sets

Intersection of Sets

Difference between Sets

Symmetric Difference between Sets

Creating a Set in Python

Set Literals

The Empty Set

Adding Elements to a Set

Removing Elements from a Set

Attendance

New Material

The Size of a Set

When Are Sets Equal?

Elements in A Python Set

for Loops with Sets

Testing for Set Membership

Union of Sets in Python

Intersection of Sets in Python

Difference between Sets in Python

Symmetric Difference between Sets in Python

Augmented Set Operators

Subsets and Supersets

Disjoint

The clear Method

min And max with Sets

When Sets Are Best

Practical Example

Another Example

Sets More Efficient Than Lists

Class Exercise

Class Quiz