IT 116: Introduction to Scripting
Class 11

Today's Topics


New Material

Quiz 3

I have posted the answers to Quiz 3 here.

Reading Assignment

You should read Chapter 5, Functions, from our textbook, Starting Out with Python, before next week's class.

Homework 6

I have posted homework 6 here.

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


The mid-term exam will be given on Tuesday, October 23rd.

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 last class before the exam, Thursday, October 18th, will be a review session.

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

The Mid-term is a closed book exam.

Tips and Examples


for Loops

The range Function

Setting the First and Last Values with range

Setting the Increment with range

Reversing the range Values

Why Does Python Have the range function?

for Loops that Don't Use the Loop Value

Nested Loops

New Material

Calculation a Running Total

Augmented Assignment Operators

Calculating Averages


Using Functions in Writing Programs

Two Types of Functions

Function Names

Defining a Function

Calling a Function

Layout Rules for Functions

Functions in Scripts

Formatting Functions for This Course

Indentation in Python


Graded Quiz