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.
Project 1. cities.txt, wiktionary.txt, autocomplete.h, main.c. due Feb 14 at 10:59pm on Gradescope
Project 2. Due Apr. 4 at 10:59p.m. Files/code: seamcarving.h, c_img.c,c_img.h,png2bin.py, 3x4.png, 3x4.bin, 6x5.png, 6x5.bin, HJoceanSmall.bmp, HJoceanSmall.bin. Bill Shi's png<=>bin converter. If you want Python code for png<=>bin (optional): png2bin.py, usepng2bin.py
Lab 2: More C, strings, and recursion
Lab 5: Creating a data structure intlist.h
Lab 7: Data structures in Python
Lab 8: Data structures in Python cont'd + dynamic programming
Lab 10: Vibe coding and a bit of graphs
2023 midterm, Q1-Q4 solutions, Q5 solution from lecture
The exam will be held during the exam period.
2024 exam (relevant to 2025: everything except Q10)
2023 exam (relevant to 2025: everything except Q8)
2021 exam (relevant to 2025: everything except Q2, Q3, Q4)
Previous midterms and exams from people other than me are available on skule.ca. APS105 exams can also be good for basic practice.
Relevant questions from previous exams: 2010 (Q3, Q5, Q7) 2011 (Q1a-c, e, f, i, Q2 except preorder_print, Q5), 2012 (Q1a-e, Q2, Q3, Q8), 2015 (Q2, Q3, Q4) 2016 (Q3, Q4, Q5), 2017 (Q2, Q3, Q4)
Online exercises
Exams
Midterm
Exam
Design credit: CS229, Jan 2019.