90% Complete
What am I getting into?
A gentle introduction to the fundamentals of computer programming, which is the foundation of Computer Science. Students design, write and debug computer programs. No knowledge of programming is assumed.
What happen?
  1. 2014-01-28
    First day of class.
    • Gaddis Sections 1.1, 1.2
    • Donaldson Chapter 1
    • DEWM Chapter 1
  2. 2014-01-30
    We discussed character encodings including ASCII and UTF-8. We also looked at reserved words in Python and some built-in functions. The Sand Reckoner by Archimedes was mentioned.
    • Gaddis Sections 1.3, 1.4, 1.5
    • Donaldson Chapters 1, 6
  3. 2014-02-04
    We discussed the print function, its syntax and use. We also explored using IDLE with Python. We talked about flow charts and created one with draw.io. Quotes by President Lincoln were mentioned.
    • Gaddis Sections 1.5, 2.3
    • Donaldson Chapter 3
    • DEWM Sections 1.8, 1.9, 2.1
  4. 2014-02-06
    We discussed comments and docstrings. We also considered the statement print(print('\u2603')). We then talked about string and numeric literals.
    • Gaddis Sections 2.4, 2.5
    • Donaldson Chapter 3
    • DEWM Section 1.10, 2.1
  5. 2014-02-11
    We clarified that the homework should be submitted as a valid python module. We discussed identifiers, variables, input and the type casting functions int, float and str.
    • Gaddis Sections 2.5, 2.6
    • Donaldson Chapter 2
    • DEWM Section 2.7
  6. 2014-02-13 Notes
    We discussed the sep and end keyword arguments to the print function. We then discussed operator precedence and order of operations. We also talked about the built-in format function. Along the way we noticed some quirks of floating point arithmetic and the Pentium FDIV bug.
    • Gaddis Sections 2.2, 2.3, 2.7, 2.8
    • Donaldson Chapters 3
    • DEWM Section 2.8
  7. 2014-02-18
    We discussed defining simple functions with the def keyword and the Don't Repeat Yourself (DRY) principle. I mentioned PEP 414, its rationale and its response to certain objections. We decided to start uploading the interpreter output from the day's lesson. Unfortuantely, I forgot to do so on this day. Remind me!
    • Gaddis Sections 3.1, 3.2
    • Donaldson Chapter 5
    • DEWM Sections 4.1, 4.2, 4.4
  8. 2014-02-20 Notes
    We introduced a new context in which to work. This will enable our examples to be richer and more useful. We made use of the chr and ord functions. We also covered the basics of scope.
    • Gaddis Sections 3.4
    • Donaldson Chapters 5, 6
  9. 2014-02-25 Notes
    We discussed the boolean type in Python, the bool function and the not operator. We also discussed the if, elif, and else keywords and their usage. The date of the first midterm was announced as 2014-03-04.
    • Gaddis Sections 4.1, 4.2, 4.5, 4.6
    • Donaldson Chapter 4
    • DEWM Sections 5.1, 5.5, 5.6, 5.7
  10. 2014-02-27 Notes
    We covered the and and or operators, and their role as short-circuit operators. All material before this point is considered fair game for the first midterm. We briefly discussed for loops and the range function.
    • Gaddis Sections 4.5, 5.3
    • Donaldson Chapter 4
    • DEWM Sections 5.2
  11. 2014-03-04
    The first exam was given.
  12. 2014-03-06 Notes
    We discussed loops, reviewing the for keyword, the range function and introducing the while keyword. We coded a few examples to see the differences between for loops and while loops. Further, we discussed lists, how to compute their length with len and how to access their elements via an index.
    • Gaddis Sections 5.2, 5.3, 8.2
    • Donaldson Chapter 4, 7
    • DEWM Sections 7.15, 7.18, 8.4, 11.2, 11.3
  13. 2014-03-11 Notes
    We discussed the exam and its solutions. We went over the continue and break statements, generating some sample code along the way. We used the sum function and showed how to perform similar computations with for loops. Finally, we introduced an extremely powerful tool of Python: the list comprehension.
    • Gaddis Section 5.4
    • Donaldson Chapter 4, 7
    • DEWM Sections 7.15, 7.18
  14. 2014-03-13 Notes
    We talked about the turtle module and looked at some demonstrations. We then leanred about the import statement and its incarnations involving the from keyword. We imported the random module and discussed the functions random.random and random.randint. With these we simulated the birthday problem with for and while loops.
    • Gaddis Section 6.1
    • Donaldson Chapter 5
    • DEWM Chapter 3
  15. 2014-03-25 Notes
    The concept of exceptions was introduced along with the try and except statements. We talked about the Python standard library, especially the modules math, os, sys, and random. We discussed functions with return values and how they are evaluated. Midterm couse evaluations were conducted.
    • Gaddis Sections 6.1, 6.2, 6.3, 7.4
    • Donaldson Chapters 8, 9
    • DEWM Sections 12.1, 12.3, 19.1
  16. 2014-03-27 Notes
    The assert keyword was introduced, and its relationship to unit tests was discussed. We then moved on to a discussion of Python slice notation which applies to any sequence type. We then discussed string formatting and had some fun with that. Finally concatenation of strings was discussed, both using the + operator and the str.join method.
    • Gaddis Sections 2.8, 8.3, 9.2
    • Donaldson Chapters 6, 8
    • DEWM Sections 8.6, 8.16, 11.6
  17. 2014-04-01 Notes
    We learned about opening files with open and handling this with the with statement. We also discussed the startswith and endswith string methods. As an example we used the Official Tournament and Club Word List. Out of necessity we discussed os.chdir and os.getcwd.
    • Gaddis Sections 7.1, 7.2 and 9.3
    • Donaldson Chapters 8, 9
    • DEWM Chapters 8
  18. 2014-04-03 Notes
    We went over exceptions in more detail and practiced for the exam by writing expressions by hand and then evaluating them with the interpreter with the help of the eval function.
    • Gaddis Sections 7.4, 8.4
    • Donaldson Chapter 7
    • DEWM Sections 11.4, 19.4
  19. 2014-04-08 Notes
    The midterm exam corrections assignment was introduced. We talked about list arithmetic using the + and * operators. We discussed mutability and slice assignment, the built-in functions min and max, along with many list methods.
    • Gaddis Sections 8.5, 8.6, 8.7
    • Donaldson Chapter 7
    • DEWM Sections 11.5, 11.7, 11.11, 11.14, 11.17
  20. 2014-04-10 Notes
    We solved the Words homework assignment using sequence methods on strings as well as the string-specific methods split and join. We talked about hasattr and getattr. The sequence type tuple was introduced. We further discussed mutability by comparing and contrasting tuples and lists.
    • Gaddis Sections 8.5, 8.6, 8.7
    • Donaldson Chapter 7
    • DEWM Sections 11.5, 11.7, 11.11, 11.14, 11.17
  21. 2014-04-15 Notes
    We further discussed exceptions, how they may appear and which will be tested. We wrote a function to return a reversed copy of a given list which led to a discussion on mutability. All material before this point is considered fair game for the second midterm. We then talked about tuple assignment and unpacking, including a discussion of the example of swapping the values of two variables. Finally, we discussed unpacking in the context of a for loop.
    • Gaddis Chapters 8, 9
    • Donaldson Chapters 6, 7
    • DEWM Chapters 8, 9
  22. 2014-04-17
    The second exam was given.
  23. 2014-04-22 Notes
    We discussed strings and string methods. In particular we discussed the following string methods: upper, lower, split, join, startswith, endswith, strip, isnumeric, isidentifier. We further discussed the in keyword in the context of strings. Other topics included efficient string concatenation and Alan Turing.
    • Gaddis Chapter 9
    • Donaldson Chapters 6, 11
    • DEWM Chapters 8
  24. 2014-04-24
    We discussed the Python type dict, its literal representation syntax, the builtin dict function, accessing a dict value by its key, along with various dict methods including keys, values, items and get. We wrote a function which counts how many times a word appears in a list of words.
    • Gaddis Chapter 10
    • Donaldson Chapter 7
    • DEWM Chapter 20
  25. 2014-04-29
    We discussed the second midterm and its solutions. There will be Final Exam review sessions run by professor Deena Engel on Friday, May 9th at 11 and Tuesday, May 13th, both in our usual room WWH102. The tutoring center is also running a series of themed tutoring days. Be sure to take advantage of all these resources to prepare for the final exam.
  26. 2014-05-01 Notes
    We reviewed the construction of dicts and their methods. We then went on to do an exercise involving iteration over dicts and discussed different ways to do this. Final exam practice problems were announced.
    • Gaddis Chapter 10
    • Donaldson Chapter 7
    • DEWM Chapter 20
  27. 2014-05-06 and 2014-05-08 Caveat
    • Gaddis Chapter 13
    • DEWM Chapters 18, 25, 26
  28. 2014-05-15
    Final Exam
Somebody set up us the bomb.

Chance favors the prepared mind.

Louis Pasteur
Hello, my name is Dakota. Programming and I go way back. I also study mathematics, specifically number theory and even more specifically integer partitions. One thing I like to do is using Python to understand mathematics. I want this class to empower you to wield Python to understand your favorite subject too.
We get signal.