IT 117: Intermediate Scripting
Class 12

Tips and Examples


Review


New Material


Studying

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

The last class before the exam, Thursday, October 20th, 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.

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.

Tips and Examples

sys.argv

Why Check Command Line Arguments?

Telling the User What Went Wrong

Improving the Usage Message

Experimenting with Regular Expressions

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

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

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

Studying

Attendance

Class Exercise

Class Quiz