← back to CS 115

CS 115 lecture notes

14 sections201 worked examples238 exercises97 figures
These notes are generated. They are written against the official syllabus week by week, and the section numbers are the ones the syllabus names; the book itself was not read into them. They cover the common curriculum of the course, not one particular section: this term it runs in 6 sections with 2 different instructors. Before an exam, check them against your own instructor's slides; those are what bind you.
257 entries across 14 sections
01Introduction to programming, Introduction to Python (Chapter 1, 2)week 1 · §1, 220 worked examples · 30 exercises · 7 figures02The Basic elements of Python, Branching, Strings, Input, Iteration (Chapter 2)week 2 · §220 worked examples · 29 exercises · 7 figures03Simple numerical programs (Chapter 3)week 3 · §317 worked examples · 28 exercises · 6 figures04Functions, Scoping, and Abstraction (Chapter 4)week 4 · §Chapter 418 worked examples · 27 exercises · 7 figures05Global variables, modules, and filesweek 5 · §Chapter 418 worked examples · 24 exercises · 7 figures06Structured Types, Mutability, and Higher-Order Functions (Chapter 5)week 6 · §Chapter 519 worked examples · 26 exercises · 7 figures07Arrays and Multi-Dimensional Arraysweek 719 worked examples · 30 exercises · 7 figures08Classes and Object-Oriented Programming (Chapter 8)week 8 · §Chapter 819 worked examples · 25 exercises · 7 figures09A simplistic Introduction to Algorithmic Complexity (Chapter 9)week 9 · §Chapter 917 worked examples · 27 exercises · 7 figures10Searching and sorting: linear search, bisection search, bubble, selection and merge sort, and the recursion they are written withweek 10 · §Chapter 1017 worked examples · 27 exercises · 7 figures11Plotting with pyplot: the current figure, the format string, the five decorating calls, panels with subplot, and bar, pie and histogram chartsweek 11 · §Chapter 1118 worked examples · 29 exercises · 7 figures12Random walks: three small classes, one walk function, and the numbers and pictures that come out of running it many timesweek 12 · §Chapter 1423 worked examples · 27 exercises · 7 figures13Understanding experimental data: the least squares line, polyfit and polyval, the number that says how good a fit is, and why a better fit can be a worse modelweek 13 · §Chapter 1820 worked examples · 29 exercises · 7 figures14Review: the whole course as seven things the final can ask you to doweek 1422 worked examples · 31 exercises · 7 figures

Everything the department publishes for CS 115 — past papers with solutions, the lab manual, recorded lectures, the exam rules — is listed on the course page (2 links). If something here disagrees with those pages, they are the ones that bind you.

Spotted something missing or wrong? tell us · share your own notes or an old exam.

Last updated .