Montreal, McGill University
Struggling with COMP 202 at McGill? I offer private tutoring for McGill's introductory Python programming course in Montreal. Whether you're stuck on functions, loops, lists, or your first OOP assignment, I help you understand the concepts, not just copy the solution.
COMP 202, Foundations of Programming, is McGill University's introductory computer science course. It is required for most science, engineering, and computer science programs at McGill and serves as the entry point to the CS curriculum. The course is taught in Python.
Despite being an "intro" course, COMP 202 has a reputation for being challenging for students with no prior programming experience. The concepts build on each other quickly, and the assignments require genuine problem-solving, not just memorizing syntax.
The main difficulty is the shift in thinking required. Programming demands a precision and logical structure that most students haven't needed before. A tutor who can bridge that gap, explaining not just what to write but why, makes a significant difference.
Corrected exercises: types and conditions • loops
Corrected exercises: functions and scope • recursion
Corrected exercises: lists and dictionaries • strings
Corrected exercises: files and exceptions • classes and objects
Using = when you mean == is one of the most common bugs for beginners. Understanding the difference between storing a value and comparing two values prevents hours of frustration.
Writing a function that prints a result instead of returning it, then trying to use the result elsewhere. Understanding the difference between print() and return is fundamental.
Modifying a list inside a for loop that's iterating over it produces unexpected results. Knowing when to iterate over a copy, or when to build a new list, is a key skill for COMP 202 assignments.
Loops that run one iteration too many or too few. Understanding how range() works, and why it stops before the end value, clears up a huge number of bugs.
Beyond COMP 202, I also tutor the following courses:
Similar to COMP 202 but with a biology and data focus. Functions, loops, NumPy basics, file processing.
C programming, Unix command line, memory management, pointers, Makefiles, shell scripting.
Java, data structures (linked lists, stacks, queues, trees, graphs), sorting algorithms, complexity analysis.
Object-oriented programming I and II in Java. Classes, inheritance, polymorphism, interfaces, exception handling.
I hold a B.Sc. in Computer Science, Finance and Mathematics from McGill University and an M.Sc. in Applied Computer Science from Concordia University. I've been tutoring programming in Montreal for over 10 years, from introductory Python to advanced data structures and algorithms.
I know exactly where students get stuck in COMP 202, and more importantly I know how to explain the concepts in a way that builds real understanding. My goal isn't to get you through one assignment. It's to make you a stronger programmer.
Nine sets, ninety corrected exercises, with the full solution on the page: no download, no sign-up. One set per chapter of the course, from types and conditions to classes and objects, plus one set that covers the whole term at once and is the one to work through before a midterm.
The ten exercises a COMP 202 student actually loses marks on. Part A is the mechanics: the three division operators and the negative floor, truth values and short circuiting, the boundaries of range and the accumulator pattern, string slicing against string indexing, and list aliasing drawn as a memory diagram. Part B works at midterm level: call frames and the print against return distinction, nested loops and the list-of-lists trap, five plausible statements to correct, a file of marks read and reported on, and a naive Fibonacci whose call tree explains why correct is not the same thing as usable.
10 corrected exercises • 100 points
In EnglishThe first third of COMP 202, the part every later assignment stands on. Part A takes the mechanics: what an operator means once the types on either side of it change, the border between the text world and the number world that input and int cross in opposite directions, the binary fractions behind 0.1 + 0.2, De Morgan and the precedence that makes not a == b mean a != b, and a cascade of elif written in increasing order that collapses onto its first branch. Part B works at midterm level: a fare program with one error message and one silent wrong answer, the leap year rule and the price of testing in the wrong order, five statements to correct, a dosage calculator judged on its boundaries, and progressive tax brackets where the classic bug charges nearly twice what is owed.
10 corrected exercises • 100 points
In EnglishThe chapter where a program stops being a list of instructions. Part A takes the mechanics: the question that decides between for and while before a line is written, the accumulator family beyond the sum with the neutral starting value each one needs, break and continue and the else that belongs to a loop, the order in which a nested loop visits its pairs, and a trace table filled row by row on a program that peels the digits off a number. Part B works at midterm level: a menu loop with three ways of never ending, the Collatz sequence whose length no for loop can bound, five statements to correct, a savings account where the answer is the month itself, and a primality test cut from 9971 divisions down to 98.
10 corrected exercises • 100 points
In EnglishThe chapter every assignment of the term goes through, because data arrives as text. Part A takes the mechanics: negative indices and the step of a slice, the string methods sorted by what they GIVE BACK rather than learned one by one, split and join as the two halves of one idea with the empty field that survives a double separator, the four ways to ask where a substring is and the -1 that is also a valid index, and building a string in a loop against joining once. Part B works at midterm level: one line of a data file taken apart field by field, palindromes with the reverse slice and with two pointers, five statements to correct, a Caesar cipher with its wrap around, and word statistics computed without a single dictionary.
10 corrected exercises • 100 points
In EnglishThe chapter that decides the mark on every assignment after it. Part A takes the mechanics: the header read as a contract with its keyword arguments and its defaults, return with one value or several and the None that travels when there is none, scope and the UnboundLocalError raised on a line ABOVE the assignment that caused it, the design choice between giving back something new and changing what you were given, and the docstring with the three tests that go with it. Part B works at midterm level: one long script cut into six functions with its call graph, a small library of date functions built on each other, five statements to correct, a dice simulation judged against the exact distribution, and a function handed to another function.
10 corrected exercises • 100 points
In EnglishThe chapter where a program stops holding one value at a time. Part A takes the mechanics: the list methods sorted by what they give back, with every mutating call returning None; the copy that stops at the first level and the inner lists it leaves shared; the dictionary and the lookup whose cost does not grow; the counting idiom with get that replaces a quadratic scan by a single pass; and sets and tuples, each defined by what it refuses. Part B works at midterm level: a board read by row then column with its diagonals, an inventory whose values are records, five statements to correct, two class lists merged with set operations and a dictionary of lists, and five situations where the structure is chosen before the loop is written.
10 corrected exercises • 100 points
In EnglishThe chapter where the program meets the outside world. Part A takes the mechanics: the modes of open and the one that empties the file the moment it is opened, a file read as one run of characters where a line still carries its newline and a handle read twice gives nothing the second time, writing that adds nothing at all to what it is given, the four clauses of try with the bare except that stops the user from interrupting, and the table of exceptions read as the contract each one names. Part B works at midterm level: an input function that survives its user, a CSV of temperatures turned into a report, five statements to correct, a file written and read back, and the design question of WHERE an exception should be caught.
10 corrected exercises • 100 points
In EnglishThe chapter students either understand in one afternoon or fight for a term. Part A takes the mechanics: the two obligations of a recursive function and the four ways of breaking them, reading a recursion by trusting the call rather than unrolling it, the stack of frames and the thousand deep limit that turns a runaway recursion into an exception, recursion on a string with the slicing that quietly copies, and recursion on a number where halving and subtracting give completely different depths. Part B works at midterm level: binary search written with indices and its off by one, the towers of Hanoi and the difference between exponential work and repeated work, five statements to correct, a structure of unknown depth that no loop can walk, and memoisation cutting two and a half million calls down to fifty nine.
10 corrected exercises • 100 points
In EnglishThe last chapter of COMP 202, and the one that decides the final assignment. Part A takes the mechanics: the class as a blueprint and self as the object to the left of the dot, the attribute written in the class body that every object shares against the one written with self, the methods Python calls for you when you print or compare, the invariant a class exists to guarantee, and an object handed to a function where mutating is visible and rebinding is not. Part B works at the level of a final assignment: an account that keeps its promise, a list of objects compared with the dictionary of records it replaces, five statements to correct, a course made of students, and inheritance with the one test that says when not to use it.
10 corrected exercises • 100 points
Get in touch to book a first session, in person or online, adapted to your schedule.