Matt Kindy







Instructor: Matt Kindy
Web Site: http://cs118.kindy.net
matthew.kindy@erau.edu -- 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


   









Headlines



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


UP-SHIP.com

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




Exercises

# 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
=== SPRING BREAK ===
P13 2014-03-25 Gradebook 1
P14 2014-03-31 Hangman A
P15 2014-04-04 Hangman B
P16 2014-04-09 Hangman C



Exams

# 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
(Solution)
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
eMail: Jessica.Updegrove@my.ERAU.edu
Phone:
Lab:
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


lecture_20090902_01.txt
# How to start your programs:

lecture_20090902_02.txt
# Program layout: affirmation, comments

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

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

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

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

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

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

lecture_20090930_01.txt
# IF with dangling ELSE: importance of indentation

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

lecture_20090930_03.txt
# importing functions

lecture_20091005_01.txt
# Using the index() method of lists

lecture_20091021_01.txt
# Loops - A means to repeat code. FOR loops

lecture_20091021_02.txt
# Demo loop program - FOR loop

lecture_20091023_01.txt
# Loops, continued: Remind FOR loops; WHILE loops

lecture_20091028_01.txt
# Ramdom numbers and Unicode characters

lecture_20091028_02.txt
# Using a FOR loop to count

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

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

lecture_20091113_01.txt
# Reading a file: readline(), rstrip() methods

lecture_20091116_02.txt
# Functions. Example card game start

lecture_20091130_01.txt
# Example file writing program

lecture_20100202.py.txt
# Code demonstrating I/O

lecture_20100209.py.txt
# Lecture 2010-02-09

lecture_20100211.py.txt
# Library functions

lecture_20100211_2.py.txt
# Prep for GUI

lecture_20100216_01.py.txt
# Multiple data, single variable

lecture_20100218_01.py.txt
# Reminder:

lecture_20100223_01.py.txt
# The range() function will make a list:

lecture_20100225.py.txt
# The original string

lecture_20100323.py.txt
# Lecture 2010-03-23 (Tuesday)

lecture_20100415.py.txt
# Program to print a card

lecture_20100422.py.txt
# The print_card() function

lecture_20100910_01.py.txt
# Lecture 2010-09-10

lecture_20100913_01.py.txt
# Lecture Monday, 2010-09-13

lecture_20100917_01.py.txt
# Lecture 2010-09-17 Friday

lecture_20100922_01.py.txt
# Arrays: Lists and Tuples

lecture_20100927_01.py.txt
### More on arrays...

lecture_20101004_01.py.txt
# New and old stuff...

lecture_20101008_01.py.txt
# Simple stuff today:

lecture_20101008_02.py.txt
# Show the matched_letters list

lecture_20101010_01.py.txt
# Loops - the means to repeat code

lecture_20101011_01.py.txt
# Loops - the means to repeat code

lecture_20101018_01.py.txt
# Exam 2: Wednesday, October 20 (in class)

lecture_20101018_02.py.txt
# A test from Hangman:

lecture_20101101_01.py.txt
# Lecture 2010-11-01

lecture_20101110_01.py.txt
# Battleship - using programmer-defined functions (not "user-defined")

lecture_20101122_01.py.txt
# Files in Python

lecture_20120907_01.py.txt
# Variables

lecture_20120910_01.py.txt
# Placeholders

lecture_20120910_02.py.txt
# Operators, variables, data types

lecture_20120912_01.py.txt
# Problem solving

lecture_20120912_02.py.txt
# Functions

lecture_20120912_03.py.txt
# Booleans

lecture_20120914_01.py.txt
# Conditionals

lecture_20120924_00_jessica.txt
# Running total

lecture_20120924_01.py.txt
# Trapping the user

lecture_20120924_02.py.txt
# WHILE loops

lecture_20121003_01.py.txt
# Lecture 2012-10-03

lecture_20121008_01.py.txt
# More Lists!

lecture_20121024_01.py.txt
# Class demo - exam program

lecture_20121031_01.py.txt
# Strings

lecture_20121102_01.py.txt
# Lecture 2012-11-02 Friday

lecture_20121114_01.py.txt
# Files (File I/O)

lecture_20121114_02.py.txt
# Testing program

lecture_20121128_01.py.txt
# Reminder:

lecture_20121128_02.py.txt
# Demo program - use functions to compute roots

lecture_20121203_01.py.txt
# Dictionaries / Hashes

lecture_20121203_02.py.txt
# An example translator

lecture_20130116_01_p01_hello_world.py.txt
# First thing in all programs

lecture_20130116_02.py.txt
# Variables and Data types

lecture_20130118_01.py.txt
# User I/O

lecture_20130123_01.py.txt
# Lecture from last time reviewed first

lecture_20130125_01.py.txt
# Library functions and modules

lecture_20130128_01.py.txt
# Conditionals

lecture_20130128_02.py.txt
# Solve the quadratic equation provided by the user

lecture_20130201_demo01.py.txt

lecture_20130204_01.py.txt
# Example test program

lecture_20130204_02.py.txt
# Don't do this:

lecture_20130213_01.py.txt
# Loops

lecture_20130215_01.py.txt
# Loops, part 2

lecture_20130313_01.py.txt
# Sequences - lists, tuples, strings

lecture_20130315_01.py.txt
# Lists

lecture_20130329_01.py.txt
# Strings

lecture_20130415_01.py.txt
# Functions: Programmer-defined functions

lecture_20130419_01.txt
Pass By Value vs. Pass By Reference


Documents


Syllabus

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


Handling Numbers
Base Conversion explanation
Another Base Conversion explanation


Functions
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


References


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



Python
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


HTML / PHP
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
requestval.txt -- required for PHP work
Right-Click and "Save Target As" to download, then rename as "requestval.php"


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



Utility Software



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

ASCII
Make ASCII art from an image file
Popup ASCII table

Base Conversion
Java Applet base conversion
Flash base conversion calculator