CSCI201: Computer Programming I

Updated 2018-12-11

# Day #28. Thursday, 12/06/2018

·         Chapter 15: Recursion.

·         Examples of recursion (videos): Flood-fill, fractal

·         Examples of recursion (Python code): Sierpinski triangles, Towers of Hanoi

·

# Day #27. Tuesday, 12/04/2018.

·         Chapter 16: Objects in Python. Notes.

#### Homework due next class

·         Program #23: Write an Account class for a bank savings account and the code to test it.

# Day #26. Thursday, 11/29/2018

·         Pattern matching: regular expressions. Notes. Regular Expression Quick Guide.

·         Regular expression exercises.

#### Homework due Thursday

·         Program #22: Using regular expressions to find patterns in an email data file. Instructions. mbox.txt. mbox-short.txt.

·         Read chapter 16: Classes and Objects—the Basics. Expect a quiz.

# Day #25. Tuesday, 11/27/2018

·         Dictionary problems: #15 (count letter frequencies) and #19 (pirate talk) from textbook, chapter 12. Alice in Wonderland

·         Exceptions. Notes. List of Exceptions.

#### Homework due Thursday

·         Watch these videos: Video 1. Video 2. Video 3.

·         Read this chapter. Online chapter. Expect a quiz.

# Day #24. Tuesday, 11/20/2018

·         How to code like a NASA programmer

·         Python online resources: Exercises, Coursera online book, Coursera online videos

·         Dictionaries. Notes. Py4E video 1. Py4E video 2. Py4E video 3.

·         Exercise: Count words. Data file.

#### Homework due Tuesday, 11/27/2018:

·         Program #21: World Series winners.

·         Read Chapter 13: Exceptions. Expect a quiz.

# Day #23. Thursday, 11/15/2018.

·         Test #2

·         Download the test shell. Data file: Numbers.txt. Right-click on each file and choose "Save link as…".

# Day #22. Tuesday, 11/13/2018.

·         Review: pizza program

·         Formatting output with "f" strings.

·         Files, lists, if statements. Stocks problem.

·         Test #2 is next class. Things to know.

#### Homework due Tuesday, 11/20/2018:

·         Read chapter 12 (Dictionaries). Expect a quiz.

·         Program #19. Credit Cards

#### Homework due Tuesday, 11/20/2018:

·         Program #20. Quiz averages, files. Data file.

# Day #21. Thursday, 11/08/2018.

·         Visit to Great West.

# Day #20. Thursday, 11/01/2018. Files, selection

·         Test will probably be Day #23 (Thursday, 11/15/2018)

·         No class on Tuesday

·         Files. Notes. QB-Stats.

·         Selection. Notes.

·         Selection, compound Booleans. Notes.

#### Homework due Tuesday, 11/06/2018:

·         Program #17. The Linux wc utility. Sample files: GettysburgShort.txt, Gettysburg.txt.

#### Homework due Thursday, 11/08/2018:

·         Program #18. Pizzeria bills.

# Day #19. Tuesday, 10/30/2018.

·         Visit to Great West on November 8?

·         Functions, parameters, scope. Notes.

#### Homework due Thursday, 11/01/2018:

·         Program #16. World Series winners, version 2. Data file.

·         Read chapter 11. Expect a quiz.

# Day #18. Thursday, 10/25/2018. More lists

·         Caesar cypher.

·         Write these algorithms. Do not use the built-in sort or reverse methods.

·         A file is a list. 1400 words.

·         List cheat sheet

#### Homework due Tuesday, 10/30/2018:

·         Program #15. World Series winners. Data file.

# Day #17. Tuesday, 10/23/2018. Lists

·         Python videos

·         Lists. Notes.

·         List functions to try.

#### Homework due Thursday, 10/25/2017:

·         Program #14: List algorithms

·         Read Chapter 10.6-10.14. Expect a quiz

# Day #16. Thursday, 10/18/2018. More strings

·         Common integer algorithms.

·         More hangman: how to print the hangman; hangman=" | \n O \n/|\\\n/ \\\n"

·         More hangman: how to print the clue

·         More strings. Exercises.

#### Homework due Tuesday, 10/23/2018:

·         Program #13: Caesar Cypher

·         Read chapter 10.1-10.5 (intro to lists). Expect a quiz.

# Day #15. Tuesday, 10/16/2018.

·         Here is a summary of the string methods.

·         Here is a summary of the built-in functions we have seen so far.

·         More strings (chapter 9).  Notes.

#### Homework due Thursday

·         Program #12: Finish the program (from the Notes link above) that will validate a password to make sure that it is (1) at least 8 characters long, (2) has at least 1 lowercase letter, and (3) has at least 1 uppercase letter.

# Day #14. Tuesday, 10/09/2018

·         Strings (chapter 9).  Notes.

#### Homework due Tuesday, 10/16/2018 (no class this Thursday—Fall break)

·         Program #11: Write a program that plays a simplified version of the Hangman game. Instructions. Words file.

# Day #13. Thursday, 10/04/2018

·         Indefinite loops. Notes.

#### Homework due Tuesday

·         Read chapters 8 and 9. There will be a quiz next class.

·         Program #10: Write a program to determine the student with the highest test score. Instructions.

# Day #12. Tuesday, 10/02/2018

·         Test #1.

# Day #11. Thursday, 9/27/2018

·         Steganography: Can you find the hidden picture here? tulips. family

·         Flip a pic, top to bottom

·         Review for test

·         Add a border to a pic video

·         Blur a pic video

#### Homework due Tuesday, 10/02/2018

·         No programming assignment. Study for first test. Practice Test. Solution. Video solution, part 1. Video solution, part 2.

# Day #10. Tuesday, 9/25/2018.

·         More image algorithms: Shrink, reverse, blur. Notes. Tulips.

·         Why pic width and height must be EVEN numbers if you want to shrink them by half.

#### Homework due next class:

·         Program #9: Write the flip program described in the Notes link above. You may work with one partner. If you do, submit ONE copy of the program with BOTH names in the comments and print statement.

# Thursday, 9/20/2018.

·         No class. Tom is sick.

# Day #9. Tuesday, 9/18/2018.

·         Test will probably be next Thursday

·         Today: more image algorithms. Notes.

# Day #8. Thursday, 9/13/2018.

·         Today: selection in Python. Some pics: et.bmp, gg.bmp, b&w lion, liberty in color, roses, tulips

#### Homework due next class:

·         Program #8: Write a program that puts a border around a picture. Instructions. Picture file. Resources: Chapter 7 of textbook, instructor notes.

# Day #7. Tuesday, 9/11/2018.

·         More nested loops: image processing. Notes. Pics.

#### Homework due next class

·         Program #7: 5-10-20 problem. Data file.

# Day #6. Thursday, 9/06/2018.

·         Today: writing functions. Notes.

#### Homework due next class:

·         Read chapter 6, sections 1-6.

·         Program #6: Write a snowflake program that uses a function.

# Day #5. Tuesday, 9/04/2018.

·         More loops: nested loops. Notes.

#### Homework due next class

·         Program #5: Stars of polygons

# Day #4. Thursday, 8/30/2018.

·         More loops, more turtle graphics. Notes.

#### Homework due next class

·         Program #4: A circle/star of parallelograms.

# Day #3

·         Notes from previous class

·         Turtle graphics (chapter 4).

#### Homework due next class (at noon)

·         Program #3: turtle graphics, repetition, stars

# Day #2. Thursday, 8/23/2018

·         Notes from previous class

·         Today: arithmetic, relational operators, Boolean values, data types, input

#### Homework due next class

·         Program #2 to compute average score for a student. Put your "py" file in the drop box before noon on Tuesday.

·         Read chapter 3 of our textbook.

·         Read sections 4.1-4.5 of our textbook.

# Day #1. Tuesday, 8/21/2018

·         How to become a superstar

#### Software used in this class

·         Required: Anaconda Python

Lab activation code: NN333-C9VA4-5G6X6-D8QV5
Personal activation code: 6N316-69E16-PP4XP-EV4KB

·         Optional: An online Python interpreter

·         Optional: A portable version of Python (no installation or admin privileges required): WinPython

#### Python resources:

·         Our (free) online textbook: How to Think Like a Computer Scientist

·         Another free Python course: Coursera online book, Coursera online videos

·         And another: Python Programming Fundamentals videos. These are Python videos for the textbook Python Programming Fundamentals.

·

#### Homework due Day #2 at class time

·         Read, print, and sign the Attendance, Test, and Homework Policies.

·         Read chapters 1 and 2 of our textbook: How to Think Like a Computer Scientist. Be prepared for a quiz.

·         Write program #1 and put it in the drop box copy the program instructions and email them to me (just copy/paste into the email message).