IT 117: Intermediate Scripting
Class 12

Tips and Examples


Review


New Material


Studying


Microphone

Homework 6

I have posted homework 6 here.

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

Quiz 4

Let's look at the answers to Quiz 4

Midterm

The Midterm exam for this course will be held on Tuesday, October 22nd.

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 Graded Quizzes.

There will be 15 of these questions worth 4 points each.

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

Each of the code questions is worth 10 points each.

To study for the code questions you should know

A good way to study for the code questions is to review the Class Exercises and homework solutions.

The last class before the exam, Thursday, October 17th, will be a review session.

You will only be responsible for the material in the Class Notes for that class on the exam.

You will find the Midterm review Class Notes here.

If for some reason you cannot take the exam on the date mentioned above you must contact me to make alternate arrangements.

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 use 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.

Questions

Are there any questions before I begin?

Tips and Examples

Studying for the Midterm with Flashcards

sys.argv

Why Check Command Line Arguments?

Telling the User What Went Wrong

Improving the Usage Message

Experimenting with Regular Expressions

Problems Running hw6.py on pe15.cs.umb.edu

Review

The Characters in Regular Expressions

Ordinary Characters in Regular Expressions

Using Regular Expressions to Find a Match

A Test Function for 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

Attendance

New Material

Real World Regular Expressions

Getting Strings from a Match

The ( ) Meta-characters

Extracting Text in a Loop

A New Regular Expression Testing Script

Repetition in Regular Expressions

Specifying a Range of Repeating Characters

Specifying Minimum and Maximum of Repeating Characters

Creating Custom Character Classes

Ranges of Characters in a Character Class

Anchors in Regular Expressions

The ^ Meta-Character

The | Meta-Character

Greedy versus Non-greedy Matching

Other Methods to Find a Match

Studying

Class Exercise

Class Quiz