Matt Kindy

Instructor: Matt Kindy
Web Site: -- Preferred method of contact
Office: LB116
Office Hours

[Warning: A little gross]
Click to see...the Life of a Programmer

A former CS118 student?         Computer fights back!                                                      
(Thanks to Nick Fisher)

New MS Products?
Thanks to Eric Johnson and Jessica Johnson!

Mac users, beware...

Street Soccer                 Brazilian Ping Pong                 Play With Heart



Office hours canceled for Monday, April 21

I will be available throughout the week, including other regular office hours

Final Exam: 8am Monday, April 28 in LB228

Class-wide Emails

These are emails that I sent to all members of the class. Please review them to be sure you've received all the information you need:

2014-01-10 EX02 correction
2014-01-17 AI Club
2014-02-15 Faculty Email Change
2014-03-24 Exam Revisions

Questions and Answers

My partially-completed textbook - updated 2014-02-07 (Thanks to David Toon for finding an error)

A printable booklet - use duplex mode printing

Put me in your email whitelist so that you don't miss any emails

If you don't use your ERAU email, be sure to forward it

How do I login to my Network Storage (i.e. P: drive)?

Academic calendar

Important Dates

Basic dialog boxes available with Python

News Items

US adults were last generation's students

and the results are disturbing

Father & son launch spacecraft

And they got it back!

The smallest USB drive ever!

Just don't lose it.

MemRistors arrive!

We can all relax now...

Aircraft design drawings, and more! (Sorry, nothing free)

High-speed hopes for the hypersonic A2

Mach 5!

George Boole's work was relatively obscure except among logicians...

...and seemed to have no practical use...

Engineering (Rube Goldberg-style) at my alma mater

(right-click and open in new window)

Reading Assignments

# Description Due Date

1 2014-01-09 What is a transistor?

2 2014-01-09 How a PC works

3 2014-01-12 Base Conversion PDF

4 2014-01-15 Chapters 1, 2 of P2FBO - starting with Python

5 2014-01-16 Chapters 3, 4 of P2FBO - first programs in Python

6 2014-01-18 Chapters 5-6 (Keyboard Input / Formatted Output) of P2FBO

7 2014-01-23 Chapters 7-8 (Built-in & Library Functions) of P2FBO

8 2014-02-03 Chapter 9 (Conditionals) of P2FBO

9 2014-02-10 Chapter 10 (Loops) - P2FBO


# Description Due Date Solution
EX01 2014-01-08 Submit an image
EX02 2014-01-13 Prequel DOWNLOAD AND SAVE the PDF before typing into it - then save the file before submitting
EX03 2014-01-15 Base Conversion DOWNLOAD AND SAVE the PDF before typing into it - then save the file before submitting
EX04 2014-01-17 Problem Solving 1 DOWNLOAD AND SAVE the PDF before typing into it - then save the file before submitting
EX05 2014-01-22 Algorithms 1 DOWNLOAD AND SAVE the PDF before typing into it - then save the file before submitting
EX06 2014-01-22 First Programs Place all .PY files in a single ZIP file for submission
EX07 2014-01-23 User I/O
EX08 2014-01-25 Library Functions
=== End of Exam 1 material ===
EX09 2014-02-05 Conditionals
EX10 2014-02-12 Loops
EX11 2014-02-14 Loops 2
=== End of Exam 2 material ===
EX12 2014-03-05 Arrays 1
EX13 2014-03-27 Functions 1
EX14 2014-03-29 Functions 2

Programming Assignments

# Due Date Description
P01 2014-01-21 Hello World Most will do this in class
P02 2014-01-24 Flintstone Format
P03 2014-01-27 Lost Value
P04 2014-01-28 SRB1
=== End of Exam 1 material ===
P05 2014-02-10 SRB2
P06 2014-02-14 SRB3
P07 2014-02-17 Menus
P08 2014-02-19 Ladders
P09 2014-02-21 Resistors
=== End of Exam 2 material ===
P10 2014-03-07 Resistors 2
P11 2014-03-11 Game of M
P12 2014-03-13 Kalah
P13 2014-03-25 Gradebook 1
P14 2014-03-31 Hangman A
P15 2014-04-04 Hangman B
P16 2014-04-09 Hangman C


# Date Description Stats Charts
X1 2014-01-29 & 01-31 Through conditionals Avg = 76.8 Bb only Program Total

X2 2014-02-26 & 02-28 Through loops Part 1 Avg = 64.5 Bb only Program Total

Study Guides

A word from our sponsor What is my best answer?

Exam 1 Demo 1 Efficient Cows
Exam 1 Demo 2 Resistors

Exam 1 Old Exam Program Lists
Exam 1 Old Exam Program Team Attendance
Exam 1 Old Exam Program Dog Years
Exam 1 Old Exam Program Land Shapes
Exam 1 Old Exam Program Coffee
Exam 1 Old Exam Program Regular Polygons

Exam 1.5 Demo 01 Cash Register

Exam 2 Demo Calculating Pi
Exam 2 Demo Fibonacci Sequence #1
Exam 2 Program Cash Register
Exam 2 Program Elsie the Cow

Exam 3 Demo Programs Array programs
Exam 3 Demo Programs String programs
Exam 3 Demo Programs Arrays, functions
Exam 3 Program 2013 Spring Lists from Strings
Exam 3 Program 2013 Fall Thanksgiving
Exam 3 Program 2014 Spring Battleship Prep

Exam 4 Demo Program Thanksgiving
Exam 4 Demo Program Database
Exam 4 findname() function

Exam 5 Study Session
Exam 5 Hello World 2

Extra Credit

XC01: Exam 1.5 - in class, Friday, February 7

XC02: Simple Interest - due 11:59pm Monday, 2014-03-03 (absolute)

Jessica Updegrove - Lab Assistant
Tutoring Hours: W 6pm - 9pm LB172

Lecture Notes

These notes and programs are NOT sufficient for studying for exams. Use them to augment your own notes.
Programs are not guaranteed to run. Your mileage may vary... Test in an inconspicuous area first...

Wednesday, 2014-01-15 Simple CLI input & output

Friday, 2014-01-17 Formatted output

Wednesday, 2014-01-22 Placeholders & format modifiers

Friday, 2014-01-24 Library functions

Monday, 2014-01-27 Exam 1 Preparation

Monday, 2014-02-03 Conditionals, pg 1

Monday, 2014-02-03 Conditionals, pg 2

Monday, 2014-02-10 Loops 1

Wednesday, 2014-02-12 Loops 2

Monday, 2014-03-03 Arrays 1 - Sequences, methods; Tuples, Lists, Strings, Dictionaries

Wednesday, 2014-03-05 Arrays 2.1 - append(), insert(), remove(), pop(); range operator, slices, augmentation, concatenation

Wednesday, 2014-03-05 Arrays 2.2 - Alias to a list; how to make a copy of a list

Wednesday, 2014-03-05 Arrays 2.3 - Use copy of list to fundamentally concatenate two lists

Wednesday, 2014-03-05 Arrays 2.4 - Getting rid of duplicates in a list

Monday, 2014-03-10 Strings

Wednesday, 2014-03-26 Functions - vocabulary

Wednesday, 2014-03-26 Functions - layout of main program

Wednesday, 2014-03-26 Functions - layout of main program, partial example

Wednesday, 2014-03-26 Functions - simple example

Old Lecture Notes

# How to start your programs:

# Program layout: affirmation, comments

# Formatted output: The print() function; escape sequences, suppressing newlines

# Variables, data types, operators, string variables, constant strings, placeholders, format modifiers

# Reading input from user; int(), float(), and str() functions for conversions

# Lists (arrays) vs scalars (normal variables); index (indices); append "method"

# Lists and tuples; indexing; list() and tuple() functions; immutable tuples; list methods; slices, range operator; running totals

# Relational and Logical operators; Boolean values; Boolean operators; IF statements; string concatenation

# IF with dangling ELSE: importance of indentation

# The IN operator: checking for membership in a list or tuple

# importing functions

# Using the index() method of lists

# Loops - A means to repeat code. FOR loops

# Demo loop program - FOR loop

# Loops, continued: Remind FOR loops; WHILE loops

# Ramdom numbers and Unicode characters

# Using a FOR loop to count

# Counting elements that match - combining FOR loop with nested IF

# Beginning of File I/O: file handles; access mode codes; open and close methods

# Reading a file: readline(), rstrip() methods

# Functions. Example card game start

# Example file writing program
# Code demonstrating I/O
# Lecture 2010-02-09
# Library functions
# Prep for GUI
# Multiple data, single variable
# Reminder:
# The range() function will make a list:
# The original string
# Lecture 2010-03-23 (Tuesday)
# Program to print a card
# The print_card() function
# Lecture 2010-09-10
# Lecture Monday, 2010-09-13
# Lecture 2010-09-17 Friday
# Arrays: Lists and Tuples
### More on arrays...
# New and old stuff...
# Simple stuff today:
# Show the matched_letters list
# Loops - the means to repeat code
# Loops - the means to repeat code
# Exam 2: Wednesday, October 20 (in class)
# A test from Hangman:
# Lecture 2010-11-01
# Battleship - using programmer-defined functions (not "user-defined")
# Files in Python
# Variables
# Placeholders
# Operators, variables, data types
# Problem solving
# Functions
# Booleans
# Conditionals

# Running total
# Trapping the user
# WHILE loops
# Lecture 2012-10-03
# More Lists!
# Class demo - exam program
# Strings
# Lecture 2012-11-02 Friday
# Files (File I/O)
# Testing program
# Reminder:
# Demo program - use functions to compute roots
# Dictionaries / Hashes
# An example translator
# First thing in all programs
# Variables and Data types
# User I/O
# Lecture from last time reviewed first
# Library functions and modules
# Conditionals
# Solve the quadratic equation provided by the user
# Example test program
# Don't do this:
# Loops
# Loops, part 2
# Sequences - lists, tuples, strings
# Lists
# Strings
# Functions: Programmer-defined functions

Pass By Value vs. Pass By Reference



Tutorials & Examples
A page with a simple form demonstrating HTML input types

Handling Numbers
Base Conversion explanation
Another Base Conversion explanation

Introduction to functions
Pass by Value vs. Pass by Reference

Working with Lists
Alias vs. Shallow Copy vs. Deep Copy
List Comprehensions

Alternative Books and Web Sites

CS118 text-in-progress (updated 2014-02-07)

Official Python manual
How to Think Like A Computer Scientist (Python)
Example Code
IBM Python Tutorial


Base conversions - thanks to Angela Poon!
An ASCII chart(JPG image 675KB - good for online reference)
Another ASCII chart(PDF doc - 2.5MB, but makes a nice printable reference page)

Mac Software

Python 2.6.2 IDE for OS X 10.3 and above
Download and install

Windows Software

Mobile Python - Python 2.5: run it from your USB drive!

Python and IDE - UPDATED 2012-08-25!
Right-click and "Save Target As" to download, then right-click the downloaded file and choose Install
To start, choose "IDLE" from the Python 2.7 item on your Start menu

WinPython IDE [434MB] - nice development environment, but large download

Python windowing tools
NetShell GUI - a front-end for a command-prompt program

Uniserve - Personal Web Server
Right-click and "Save Target As" to download (I recommend you save and install to your F: drive)
then double-click the downloaded file.

PSPad - HTML / PHP editor
Right-click and "Save Target As" to download (I recommend you save and install to your F: drive)
then double-click the downloaded file.

requestval.txt -- required for PHP work
Right-Click and "Save Target As" to download, then rename as "requestval.php"

Acrobat Reader -- it allows you to read and print PDF files.
CutePDF 2.7 - works on Vista/Win7

Utility Software

Acrobat Reader -- it allows you to read and print PDF files.
CutePDF 2.7 - works on Vista

Make ASCII art from an image file
Popup ASCII table

Base Conversion
Java Applet base conversion
Flash base conversion calculator