CSCI201: Computer Programming I

Updated 2020-07-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: https://classroom.github.com/a/D221YmMz

 

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

Class #1.

·        How to become a superstar

·        Beginning Python: notes

Software used in this class

·        Required: Anaconda. Choose Python 3.7 (may be 3.8 by the time classes begin), 64-bit graphical installer for your computer (there is a Windows version and a Mac version).

·        Optional: An online Python interpreter

Python resources:

·        Textbook

·        Chapter on Turtle graphics

·        Video playlist for textbook

Homework

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

·        Read chapter 1 and chapter 2 of our textbook. Be prepared for a quiz.

·        Watch videos from our playlist. Videos 1-7, 10-14 (100 minutes).

·        Program #1: payroll.

 

Class #2.

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

·Saving a program and handing it in.

Homework

·        Program #2: Compute average score for a student.

·        Read chapter 3: Selection

Class #3: Making decisions

·        Notes.

·        Selection, compound Booleans. Notes.

Homework

·        Program #3:

·        Read Runestone chapter 3: Errors.

·        Read Runestone chapter 4: Turtle graphics and the for loop.

Class #4: Repetition, turtle graphics

·        Turtle graphics. Notes. Examples

Homework

·        Program #4: turtle graphics, repetition, stars

Class #5. Repetition (loops), turtle graphics

·        More loops, more turtle graphics. Notes.

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

Homework

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

Class #6. Nested loops

·        More loops: nested loops. Notes.

·        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

·        Read chapter 4: Functions.

·        Program #6a: Spiral Rainbow

·        More loops: nested loops. Notes.

·        Program #6b: Write an arrowhead program.

Class #7.

·        Today: writing functions. Notes.

Homework:

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

Class #8.

·        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

·        Read chapter 7.

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

Class #9.

·        Test will probably be next Thursday

·        Today: more image algorithms. Notes. Pic.

·        Some hidden pics: pic, pic

Homework

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

Class #10.

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

Homework:

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

Class #11.

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

·        How to hide a picture

·        How to hide a message

Homework

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

Class #12. Thursday, 10/01/2020

Class #13.

·        Indefinite (while) loops. Notes.

Homework

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

Class #14.

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

Class #15. 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:

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

Class #16. 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:

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

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

Class #17.

·        Jobs in IT. Guest speaker from Interstates.

·        More strings/lists.

·        Discuss Caesar Cypher program.

Homework:

·        Program #15: Caesar Cypher.

·        Read Chapter 10.6-10.14. Expect a quiz

Class #18. Lists

·        Lists. Notes.

·        List quick guide

·        More quick guides: Strings, Turtle graphics

Homework:

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

Class #19.

·        Writing code! List functions: Homework:

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

·        Read chapter 11. Expect a quiz.

Class #20:

·        Test #2 will be next Thursday

·        Functions, parameters, scope. Notes.

Homework:

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

Class #21. Files, selection

·        Test will be next class

·        Files. Notes. QB-Stats.

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

·        Practice test. Solution.

Homework due next Tuesday (after the test):

·        Program #19. Pizzeria bills.

Class #22:

·        Test #2. Download the program shell.

Class #23.

·        Review: pizza program

·        Formatting output with "f" strings.

·        Files, lists, if statements. Stocks problem.

Homework:

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

·        Program #20. Credit Cards

Class #24.

·        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

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

·        Read Chapter 13: Exceptions. Expect a quiz.

Class #25.

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

·        Exceptions. Notes. List of Exceptions.

Homework

·        Program #22: Student averages. Data file.

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

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

Class #26.

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

·        Regular expression exercises.

Homework

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

Class #27.

Class #28.

Class #29.

Class #28.

Homework

Class #28. Thursday, 12/05/2019

Final Test

Class #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