IT 116: Introduction to Scripting
Class 20

Tips and Examples


Review


New Material


Microphone

Homework 9

I have posted homework 9 here.

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

You must make the script for this assignment executable or you will loose points.

Quiz 7

You will find the answers to Quiz 7 here.

Let's review them.

Questions

Are there any questions before I begin?

Tips and Examples

Reading Text Files With Python Scripts

Making a Script Executable With FileZilla

Hashbang Problem with Windows Text Files

Review

Running a Script Using python3

Running a Script Without python3

Why Make a Script Executable?

Records

Reading Records from a File

Finding the Average From a File of Records

Closing a File Object

Looping Through a File More Than Once

Attendance

New Material

More Data Processing in a Loop

Errors

Syntax Errors

Logic Errors

Runtime Errors

Exceptions Objects

Catching Exceptions

Exceptions and Data Validation

Improving the Validation Function

Being a Good Citizen

Class Exercise

Class Quiz