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).
Project 1: Gamification (gamify.py). Due Oct. 6 at 10:59p.m.(5%). Public test cases
Project 2. gomoku.py (5%). Due Nov. 17 at 10:59p.m.
Project 3. synonyms.py, test.txt Due Dec. 4 at 10:59 p.m. (5%).
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). Solutions
Lab 3: Project 1 warm-up (state machines) + for-loops. (assigned Sept. 27).
Lab 4: More Project 1 warm-up, more loops (assigned Oct. 3).
Lab 5: Lists (assigned Oct. 11)
Lab 6: Tic-tac-toe ttt.py (assigned Oct. 18)
Lab 7: Deep/shallow copy and lists of lists, getting started with Project 2 (assigned Nov. 1)
Lab 8: Debugging, time complexity, text processing tester.py. (assigned Nov. 15)
Lab 9: Gaussian Elimination (assigned Nov. 22), use_numpy.py. Sample run.
Lab 10: More complexity, recursion
The midterm was held on Oct 27.
2015 midterm paper. Reference sheet. Solutions: Part 1, Part 2 (contains optional advanced material).
2014 midterm and aid sheet. (Solutions). Note: in Q2d, True and False should switch places. Another solution is to go return not (a==b==c).
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.
2016 exam paper (reference sheet). Solutions + marking scheme.
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.)
2014 exam paper (reference sheet). Solutions and my favourite solution of Q7. Video solution of Q7.
Exams
Midterm
Exam
An inclusive environment
We strive to build and maintain an inclusive environment in class — an environment that allows every student to reach their full potential. Please do not hesitate to contact me and/or your preceptor to let us know if you need special accommodation or with any concerns.
Design credit: CS229, Jan 2019.