Syllabus

Week 1

L1:

    • course logistics
    • computer architecture
    • types of programming languages
    • setting up Python
    • running Python programs from command line

Homework:

Set up your Python installation if you haven't.

Practice the following in your OS until you are comfortable:

  • creating Python scripts (plain text files) that print some message,
  • placing them where you want on your disk,
  • running them from command line.

Reading: ch. 1~2.3.2 of the textbook

L2:

    • working with IDE
    • types of objects
    • basic operations on numbers and strings
    • variables
    • conditional statements

Homework:

  • Reading: ch. 2.4~3.4
  • Write a Python script file named "comparison.py" that compares 3 variables (x, y, z) and prints out the largest number. Assign x, y, z to any numbers you like.
  • Bring this script to the class next time.

Week 2

L3:

    • conditionals (continued)
    • types of errors
    • comments and pseudocode
    • setting up auto-grading system

Homework:

  • Finish Conditionals: the largest of three numbers assignment on Autogradr (if you haven't);
  • complete the Conditionals: grade conversion assignment on Autogradr.

Reading: ch. 2~3 of the textbook

L4:

    • iterative algorithms
    • for loop
    • while loop
    • breaking out of the loop

Homework:

  • Loops: in-class assignment on Autogradr (if you haven't);
  • Loops: Caesar's cipher and guessing game on Autogradr.

Reading: ch. 4~4.4 of the textbook

Week 3

L5:

    • loops (continued)
    • bisection search
    • function definition
    • function arguments

Homework:

  • Finish the Loops assignments on Autogradr (if you haven't);

Reading: ch. 4~4.4 of the textbook

L6:

    • functions (continued)
    • default arguments
    • scope
    • docstrings

Homework:

  • Autogradr: functions (odd_letters, strip_vowels)

Note: odd_letters function should return even letters, sorry about the confusion.

Reading: ch. 4.3~4.6 of the textbook

Week 4

L7:

    • functions (continued)
    • input and output in functions
    • debugging techniques
    • using functions in other functions exercise

Homework:

  • Finish the Functions assignments on Autogradr (if you haven't) and class exercise;

Reading: review the code in all the previous lectures

L8:

    • Python modules
    • basic import from modules
    • working with files
    • recursion

Homework:

  • Autogradr: new "save message" project, previous project still available (with late penalty)

Reading: ch. 5.1~5.5 of the textbook

Week 5

L9:

no class due to Monday schedule



L10:

    • range
    • tuples
    • lists
    • mutable vs immutable sequences

Homework:

  • Autogradr: Sequences assignment

Reading: ch. 5.6 of the textbook

Week 6

L11:

    • sequences (review)
    • dictionaries
    • list comprehension
    • multiple assignment

Homework:

  • Class exercise: frequency dictionary and Spanish dictionary;

Reading: ch. 6

L12:

    • data types (review)
    • sets
    • sorting
    • string methods

Homework:

  • Autogradr: Types assignment


  • Reading: ch.6

Week 7

L13:

    • Review

Homework:

  • Finish class exercises;

Reading: all past material

L14:


Midterm


Week 8

L15:

    • Procedural, functional and object-oriented programming
    • Regular expressions

Homework:

  • Finish class exercises;

Reading: ch. 6

Programming: finish in-class practice

L16:

  • regular expressions (practice - collecting dates and prices)
  • testing and debugging

Homework:

  • Finish class exercises;

Reading: ch. 11,

Programming: 2 RegEx assignments on Autogradr

Week 9

L17:

    • Working with Jupyter notebooks;
    • Python plotting libraries;
    • Basic plot controls with Seaborn;

Homework:

Reading: go through the class Jupyter notebook;

Programming: create a plot similar to the one in the lecture slides

L18:

  • pandas DataFrame objects;
  • basic operations with dataframes;
  • plotting dataframe data;

Homework:

Reading: go through the class Jupyter notebook

Programming: Dataframe Amazon reviews assignment on Autogradr

Week 10

L19:

    • Basic statistics concepts
    • Generating random numbers in Python;
    • Python statistics module;

Homework:

Reading: go through the class Jupyter notebook, textbook ch. 15;

Programming: finish the Amazon review assignment if you haven't. If you have, do it again with a different data structure.

L20:

  • Basic types of distributions;
  • Histograms with seaborn;
  • Visualizing Amazon review data;

Homework:

Reading: go through the class Jupyter notebook, textboox ch. 15, Seaborn gallery and documentation.

Programming: 1x2 violin plots with extra categorical variables for Amazon review data. Instructions in the slides, submit by email by next class.

Week 11

L21:

    • Basic statistics (review)
    • XML syntax;
    • Parsing XML with Python;

Homework:

Reading: go through the class Jupyter notebook, Beautiful Soup documentation;

Programming: download, process XML course file as described in lecture slides, and visualize the course distribution per subject.

L22:

  • Catching exceptions with try-except;
  • Parsing HTML with BS4;
  • Scraping web data;

Homework:

Reading: go through the class Jupyter notebook, W3Schools HTML tutorial (optional);

Programming: Rent in Boston South End assignment (instructions in the slides).

Week 12

L23:

    • XML, HTML (review)
    • JSON file format;
    • Parsing JSON data;

Homework:

Reading: go through the class Jupyter notebook, Beautiful Soup documentation;

Programming: Rent in Boston South End assignment (instructions in the slides, extended).

L24:

  • Jsonlines, YAML file formats;
  • Data engineering process;
  • Data analysis workflow;

Homework:

Reading: go through the class Jupyter notebook, textbook ch. 21

Programming: Finish the rend exercise if you haven't, re-write the jsonl doctors class exercise for practice.

Week 13

L25:

    • File formats (review)
    • Covariance;
    • Correlation;

Homework:

Reading: go through the slides, textbook ch.; 21

Programming: catch up with any missed homeworks

L26:

  • Correlation analysis (ctnd);
  • pair programming principles


Homework:

Reading: textbook ch. 21, JSON/JSONL notebooks

Programming: finish the prescriptions exercise, bring your code and solution to the next class.

Week 14

L27:

    • Review;
    • Correlation and covariance exercise;
    • Plotting with Pandas.

Homework:

Reading: Jupyter notebook with Pandas plots

Programming: catch up with any missed homeworks (half the points), 6 new Pandas assignments on Autogradr

L28:

  • Review;
  • Data structures practice;
  • Wrapping up the course.

Homework:

Reading: review anything you missed

Programming: catch up with any missed homeworks, 6 new Pandas assignments on Autogradr