IT 116: Introduction to Scripting
Class 19

Tips and Examples


Review


New Material


Microphone

Questions

Are there any questions before I begin?

Solution to Homework 7

I have posted a solution to homework 7 here.

Let's take a look.

Homework 9

I have posted homework 9 here.

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

Tips and Examples

A Simple Function

Don't Use readline() in a for Loop

Review

Getting Rid of Newline Characters

Writing and Reading Numbers

Appending Data to an Existing File

Reading Files with a for Loop

Attendance

New Material

Running a Script Using python3

Making a Script Executable

Why Make a Script Executable?

Making Scripts Executable with FileZilla

Averaging the Numbers in a File

Records

Reading Records from a File

Finding the Average From a File of Records

Additional Processing of Records

Closing a File Object

Looping Through a File More Than Once

The ACM Code of Ethics and Professional Conduct

Class Exercise

Class Quiz