IT 117: Intermediate Scripting
Class 14 - Midterm Review

Review

Homework 7

I have posted homework 7 here.

It is NOT due this coming Sunday.

Instead it is due Sunday, October 30th.

This is to give you time to study for the midterm.

And to give me time to score it.

Midterm

The Midterm exam for this course will be held on Tuesday, October 25th.

The exam will be given in this room.

It will consist of questions like those on the quizzes along with questions asking you to write short segments of Python code.

60% of the points on this exam will consist of questions from the Ungraded Class Quizzes.

The other 40% will come from four questions that ask you to write a short segment of code.

Today's class will be a review session.

You will only be responsible for the material in the Class Notes for today's class on the exam.

The Midterm is given on paper.

I scan each exam paper and upload the scans to Gradescope.

I score the exam on Gradescope.

You will get an email from Gradescope with your score when I am done.

The Midterm is a closed book exam.

You are not allowed to any resource other than what is in your head while taking the exam.

Cheating on the exam will result in a score of 0 and will be reported to the Administration.

Remember your Oath of Honesty.

To prevent cheating, certain rules will be enforced during the exam.

Quiz 5

Let's look at the answers to Quiz 5

No Class Exercise or Class Quiz

Today is a review session.

There will no Class Exercise or Class Quiz today.

Review

Dictionaries

Dictionary Literals

Getting Values from a Dictionary

Changing a Dictionary Value

Looping Through a Dictionary

When To Use a Dictionary

Adding Elements to a Dictionary

Lists versus Dictionaries

The in And not in Operators

Deleting Elements from A Dictionary

Getting the Number of Elements in a Dictionary

Sets in Mathematics

Set Membership

Subsets and Supersets

Union of Sets

Intersection of Sets

Difference between Sets

Sets in Python

Creating a Set in Python

Set Literals

The Empty Set

Adding Elements to a Set

Removing Elements from a Set

The Size of a Set

When Are Sets Equal?

for Loops with Sets

Testing for Set Membership

Union of Sets in Python

Intersection of Sets in Python

Difference between Sets in Python

Subsets and Supersets in Python

min And max with Sets

The os Module

os.getcwd()

os.listdir(path)

os.chdir(path)

Running Unix Commands within Python

os.environ

The os.path Module

os.path.isfile(path) and os.path.isdir(path)

os.path.basename(path)

The sys Module

Getting Values from the Command Line

Leaving a Running Script

The Characters in Regular Expressions

Ordinary Characters in Regular Expressions

Meta-characters in Regular Expressions

The . Meta-character

The * Meta-character

The + Meta-character

The ? Meta-character

The \ Meta-character

Character Classes

\d and \D Character Classes

The \w and \W Character Classes

The \s and \S Character Classes

Getting Strings from a Match

The ( ) Meta-characters

Repetition in Regular Expressions

Specifying a Range of Repeating Characters

Creating Custom Character Classes

Ranges of Characters in a Character Class

Attendance