Course description This course serves as an introduction to computer programming and computer science. We will introduce the Python programming language. We will use Python to solve a variety of problems, and practice problem-solving techniques that are applicable to computational problems. We will discuss good practices in software engineering (designing and building large software systems). We will analyze the efficiency of algorithms, and discuss designing efficient algorithms. Various research areas in computer science (AI, software engineering research, the theory of computation, etc.) will be introduced throughout the term. No previous knowledge of programming or computer science is assumed.
The course syllabus is available here (to be posted).
Lab 1: Tracing and Conditionals (assigned Sept. 12, show the TA during the lab).
Lab 2: Functions and Local and Global Variables: Simulating a Pocket Calculator (assigned Sept. 19, show the TA during the lab). Video solutions to the warm-up exercise. Solutions
Lab 6: Getting started with Gomoku, files, and strings (assigned Oct. 31) Solutions
Lab 8: Debugging, dictionaries, computational linguistics, and web scraping (assigned Nov. 21) gomoku.py, tester.py. Solutions: lab08.py
The midterm was held on Oct 27.
2010 midterm. (Solutions; note that there is a small bug in the solutions to the last question and that the midterm was written in Python 2, which means that it uses print <things-to-print> instead of print(<things-to-print>).)
The exam will be held in December. Past exams are below.
2015 exam paper (reference sheet). Partial solution of the challenging problems. I encourage people to work on the problems in the beginning of the exam by themsleves. (Note that Q8 and Q9 were supposed to be very challenging -- exam grades were adjusted.)
Design credit: CS229, Jan 2019.