Remember to check our discussion board frequently for announcements!

Course Information

Welcome to CSC148H! This is an Introduction to Computer Science at UTM. In this course, we'll study program design principles, object-oriented programming, recursion and recursive data structures (including lists and trees), efficiency, and sorting.

Successful students from past terms agree that the keys to this course are (1) frequent practice and (2) being active in the community. First, try to read or write Python code every day --- if only for a few minutes --- rather than doing exercises and assignments at the last minute. This will make lectures easier to understand and will also give you plenty of time to ask questions. Second, make friends with your colleagues in lecture and lab (practical). Communicate with each other on the discussion board, form study groups, and look for departmental seminars and social events.

Course Syllabus

Here are the course information sheets which contain the course policies: LEC0101, and LEC0102.

Instructor Information

Instructor Lecture Times Office LocationOffice Hours Email
Sadia Sharmin WED 9-12, FRI 2-5 DH 3095WE, FRI 12:00-1:30 s.sharmin at mail dot utoronto dot ca

Lecture Notes

This section will contain lecture slides and code developed during lecture.

Week/Topic Lab Readings/References Lecture Slides/Notes
Week 1
Object-Oriented Programming
No lab this week
Week 2
More OOP, Exceptions
More OOP: Exceptions:
Week 3
ADTs, Stacks and Queues
  • Working on Assignment 1
Week 4
Week 5
More recursion
Week 6
Linked Lists
Week 7
More Linked Lists
Week 8
Week 9
Binary Search Trees
Week 10
Sorting and Algorithm Efficiency
Week 11
Week 12
Exam Review


This section will contain information about the assignments.

For all assignments, your code should follow good style. Here are the Python style guidlines from CSC108, and examples of the function design recipe.

We are using MarkUs for assignment submissions. Each submission hides your previous submission (we will only mark your latest one).
Make sure to submit all of your files.

Assignment # Title Files
1 Assignment 1 Instructions
2 Assignment 2 Instructions


This section will contain information about mini-exercises assigned during lectures.

Mini-exercise #1: Class Design

DUE: Wednesday, May 23, 9am 11:59pm (midnight)
What to do? See instructions
Where to submit? Here; make sure to name your files exactly as specified.
Questions? Ask here
Solution: See here

Mini-exercise #2: Recursion Practice

DUE: Friday, June 8, 11:59pm (midnight)
What to do? Complete the two questions here
Where to submit? Here; make sure to name your file exactly as specified.
Questions? Ask here
Solution: See here

Mini-exercise #3: Linked List and Queue

DUE: Wednesday, July 4 Friday, July 6, 11:59pm (midnight)
What to do? See instructions
Where to submit? Here; make sure to name your files exactly as specified.
Questions? Ask here
Solution: See here

Mini-exercise #4: Expression Trees

DUE: Friday, July 20, 11:59pm (midnight)
What to do? Complete the solve_expr method in this file, based on info here
Where to submit? Here; make sure to name your files exactly as specified.
Questions? Ask here
Solution: See here


This section will contain information about our tests.

Click here for instructions about making a Remark Request

We have two in-class term tests.

Past Tests

Note: prior course offerings have used a sound or media module to ask about manipulating pictures and sounds. We are not using those modules this year, so please disregard those questions. Past tests also use Python 2 (not Python 3), so you will see raw_input instead of input and print x instead of print(x). These old tests also use an older form of string formatting.

Past Finals

The library maintains an archive of old CSC148H exams. Login to Portal and under Hot Spots click Old Exam Repository. Click on Log in with your UTORid via University of Toronto Web Login and type (exactly) CSC148H in the search field.


Software Installation

In this course, we will be working with Python, an interpreted, object-oriented language. We are using Python 3.6; do not install Python 2.
There is extensive Python documentation; you can view it online.

The course software is available in the Windows and Linux Labs (DH2020/DH2026). Python and Idle have also been installed on most of the other labs on campus, but be careful: some may not have all of the required software. If you work in a different lab (or on your own machine), make sure to test your code on a Linux Lab machine before submitting your work, as we will do marking there.

If you wish to install the software for CSC148 on your own computer, please install the following. If you run into problems, post your questions and any error messages on the course discussion board. However, the course staff (instructor, TAs, and system administrators) will not be able to sit down and help you install the software: we are responsible for the Linux Lab, and you are responsible for your own computer.

Some PyCharm FAQ

How do I install PyCharm on my own computer/laptop?
  1. Go to and download the latest version of Python, and then install it. You must be using a version of Python 3, NOT Python 2. We recommend not changing any of the default settings during installation.
  2. Go to and download the Community Edition of PyCharm. Again, we recommend keeping the default settings during installation.
  3. Open PyCharm. Open your project.
  4. Then go on File -> Settings (or PyCharm -> Preferences on Macs) then go to Project: (project name) -> Project Interpreter. - Select Python 3.5.2 in the dropdown menu for the Project Interpreter.
  5. In the settings window, choose Tools -> Python Integrated Tools, and then choose the docstring type to be "Plain"
My Python console is missing!

By default it should appear, but you can always start it by going to "Run -> Python Console..."

I get an error when I try to start the Python console or run a file.

It's likely that your Python interpreter isn't configured properly. Check step 4 in the instructions in the first question.

How do I run a file?

Open the file you want to run, then go to Run -> Run... and select the file name from the popup menu. The next time, you can click the green triangle at the top to run the chosen file.

Online Boards

Be very careful if you decide to ask for help on an online discussion board. Often, the people on those boards are professional programmers, so they usually expect other users to have a base level of knowledge and answer questions assuming that you know how to program. That can be quite confusing!

You should also be aware of the academic integrity guidelines. Getting help on a concept is allowed, but whenever you ask a question about an assignment or exercise to be turned in, you're on dangerous ground! Why? You won't be able to ask for help on exams, so if you become dependent on hints, you'll put yourself at a disadvantage. Furthermore, depending on the kind of response you get, it could be considered "unauthorized aid", which will result in an academic offense (like plagiarism). The course discussion board is safe, as you'll get answers relevant to the course (without getting too much help!), but be very careful about what kind of questions you ask on other boards.

All of that having been said, interacting with other programmers on discussion boards can be very helpful and is very good training. If you work on an open source project, you'll spend a lot of time interacting with people on similar forums. If you'd like to try an online forum, we recommend using Stack Overflow. Make sure to use the python tag. You should also probably use the homework tag to indicate that you're a student -- but again, don't ask questions about work to be turned in!

Textbooks and Documentation

(Primarily) Examples and Exercises