CSCI201: Computer Programming I

Updated 2020-05-14

Syllabus      Textbook       Finals Schedule       Academic Calendar       Python videos      Python 3.7.3 documentation      List cheat sheet

Final test is ???? 2020 from 12:30 (but you can start at noon if you want to) until 2:20 in HH112. DO NOT PLAN TO LEAVE CAMPUS BEFORE THE TEST.

Link to first github assignment:


Online Python editor. NOTE: If you use turtle graphics, you do not need any window commands. If you use this, copy/paste your code into a Word or Notepad (preferred) file and hand it in.


Earlier classes are below…

Skipped in 2019: Recursion assignment, Classes

Homework due Thursday

Day #1. Tuesday, 8/25/2020

·         How to become a superstar

·         Beginning Python: notes

Software used in this class

·         Required: Python 3.8

·         Required: Visual Studio Code

·         Optional: An online Python interpreter

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.

·         Exercises

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.


Day #2. Thursday, 8/27/2020

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

·Saving a program and handing it in.

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 and sections 4.1-4.5 of our textbook.

Day #3. Tuesday, 9/01/2020

·         Turtle graphics (chapter 4). Notes. Examples

Homework due next class

·         Finish reading chapter 4.

·         Program #3: turtle graphics, repetition, stars

Day #4. Thursday, 9/03/2020.

·         More loops, more turtle graphics. Notes.

·         Sample code: triangle, square, pentagon, polygon, star of lines, flower of polygons, spiral of polygons

Homework due next class

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

Day #5. Tuesday, 9/08/2020.

·         Lists of colors, cycling through a list

·         Colors in rainbow order (kind of)

·         Web site for Python turtle graphics (if you have problems on your computer)

Homework due next class

·         Read chapter 5.

·         Program #5: Spiral Rainbow

Day #6. Thursday, 9/10/2020.

·         More loops: nested loops. Notes.

Homework due next class:

·         Read chapter 6, sections 1-6.

·         Program #6: Write an arrowhead program.

Day #7. Tuesday, 9/15/2020.

·         Today: writing functions. Notes.

Homework due next class:

·         Program #7: Write a snowflake program that uses a function to draw one branch of the snowflake. The function must be called multiple times.

Day #8. Thursday, 9/17/2020.

·         More nested loops, image manipulation, selection.

·         Notes on selection and image processing. Some pics: et.bmp, gg.bmp, b&w lion, liberty in color, roses, tulips

Homework due next class:

·         Read chapter 7.

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

Day #9. Tuesday, 9/22/2020.

·         Test will probably be next Thursday

·         Today: more image algorithms. Notes. Pic.

·         Some hidden pics: pic, pic

Homework due next class:

·         Program #9. Add a black border to a pic. Here's a pic. Put it in the same folder as your program.

Day #10. Thursday, 9/24/2020.

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

Homework due next class:

·         Program #10: Write the flip program described in the Notes link above (left to right, not top to bottom).

Day #11. Tuesday, 9/29/2020

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

·         How to hide a picture

Homework due next class:

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

Day #12. Thursday, 10/01/2020

·         Test shell. Copy and paste into your editor.

Day #12. Tuesday, 10/06/2020

·         Test #1.

Day #13. Thursday, 10/08/2020

·         Indefinite loops. Notes.

Homework due Tuesday, 10/08/2019 (there is no class Thursday)

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

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

Day #14. Tuesday, 10/13/2020

·         Strings (chapter 9). Notes.

Homework due Tuesday, 10/15/2019 (there is no class this Thursday—Fall break)

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

Thursday, 10/15/2020. No class: fall break.

Day #15. Tuesday, 10/20/2020. More strings

·         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 next class:

·         Program #13: Write program #3 (password validator from the Notes link above).

Day #16. Thursday, 10/22/2020. 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 next class:

·         Program #14: Complete the exercises we began in class.

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

Day #17. Tuesday, 10/27/2020. Lists

·         Jobs in IT. Guest speaker from Interstates.

·         More strings/lists.

·         Discuss Caesar Cypher program.

Homework due next class:

·         Program #15: Caesar Cypher.

·         Read Chapter 10.6-10.14. Expect a quiz

Day #18. Thursday, 10/29/2020. Lists

·         Lists. Notes.

·         List quick guide

·         More quick guides: Strings, Turtle graphics

Homework due next class:

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

Day #19. Tuesday, 11/03/2020.

·         Writing code! List functions: Homework due next class:

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

·         Read chapter 11. Expect a quiz.

Day #20: Thursday, 11/05/2020

·         Test #2 will be next Thursday

·         Functions, parameters, scope. Notes.

Homework due next class:

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

Day #21. Tuesday, 11/10/2020. Files, selection

·         Test will be next class

·         Files. Notes. QB-Stats.

·         Selection. Notes.

·         Selection, compound Booleans. Notes.

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

·         Practice test. Solution.

Homework due next Tuesday (after the test):

·         Program #19. Pizzeria bills.

Day #22: Thursday, 11/12/2020

·         Test #2. Download the program shell.

Day #23. Tuesday, 11/17/2020.

·         Review: pizza program

·         Formatting output with "f" strings.

·         Files, lists, if statements. Stocks problem.

Homework due next class:

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

·         Program #20. Credit Cards

Day #24. Thursday, 11/19/2020

·         Quiz is from 12:30 to 12:35.

·         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 next class

·         Program #21: World Series winners. Data file.

·         Read Chapter 13: Exceptions. Expect a quiz.

Day #25. Tuesday, 11/24/2020

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

·         Exceptions. Notes. List of Exceptions.

Homework due Tuesday

·         Program #22: Student averages. Data file.

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

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

Day #26. Tuesday, 12/01/2020

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

·         Regular expression exercises.

Homework due next class

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

·         Read chapter 16: Recursion. Expect a quiz.

Day #27. Thursday, 12/03/2020

Day #28. Tuesday, 12/08/2020

Day #29. Thursday, 12/10/2020

Day #28. Tuesday, 11/26/2019

Homework due next class

Day #28. Thursday, 12/05/2019

Thursday, 12/12/2019: Final Test

Final Test

·         Program Shell

Day #27 & 28. Tuesday, 12/03/2019 and Thursday, 12/05/2019

·         Review problems

·         Code solution

·         Solutions:

o   Arithmetic problems 1-10: Video 1.

o   String problems 1-3: Video 2