CSC 148 H1
Introduction to Computer Science
Focus on "vocabulary" and "grammar" of programming.
definition vs. call,
parameters vs arguments,
external comments (docstrings),
basic data structures:
lists, tuples, dictionaries
"containers" for related instance variables and methods
(we'll cover this in much more detail in CSC 148)
More conceptual focus on "composition" aspect of programming.
how to understand a problem and write a solution for it,
how to properly structure a program with classes and functions
more data types:
stacks, queues, priority queues, linked lists, trees
including measures of efficiency
functions that call themselves
how to deal with unexpected situations
using classes and inheritance to model data
learn new material, with explanations
practice the new material,
get help to ensure your understanding
test your understanding on simple problems,
get feedback on your performance to help you learn from your mistakes
put it all together to implement a significant piece of code,
(done in groups of 2–3)
Term Tests and Final Exam:
demonstrate your understanding of the course material
lectures and labs:
read ahead, ask questions
for all non-personal questions and discussions
drop in on a first-come, first-served basis
to discuss any aspect of the course
for general CS help
for personal matters only, please
(there is only one of me, and over 550 of you!)
all official course documents and policies — refer to this often!
to refresh your memory about CSC 108 material;
details to be posted on the forum and course website
labs located in
BA 3200 (the "Great Hall"),
username and password: same as for CSC 108
Didn't take CSC 108?
You automatically get a CDF account created when you enrol in
username lookup page
to find out more, then go to one of the labs to log in for the first
time and reset your password.
Set up email forwarding to ensure you receive all important
All of the code you submit for credit in CSC 148 must
work on CDF.
Make sure you leave yourself time to test it out!
Every term, we watch students start typing before they think.
It's very easy to get yourself into all sorts of trouble this way!
Remember: programming is not about
making random changes to code until it "works"... ;)
Do the weekly readings.
Print them up and use a highlighter.
Take notes as you're reading and during lectures.
Many terms have a precise technical definition.
It's important to understand this and to use terms precisely.
Make a list and refer to it often!
Know the limits of collaboration!
Helping each other understand course material is great.
Helping each other work through lab exercises is fine.
But everything you submit for credit must be
your own individual work,
unless group work is explicitly allowed
(pairs for labs, groups of 2–3 for the project).
Never discuss details of your code or solution
with another student (for exercises) or group (for the project).
This includes showing or explaining parts of your solution, and
even "just looking" at someone else's solution.
High-level, interpreted language
(code is executed "as-is").
"Consenting adults" philosophy:
you can do whatever you want, even if it might not be a great idea
(in other words, Python assumes you know what you are doing
and will not try to prevent you from doing things that might be silly).
This is particularly true for naming conventions and style.
Example 1: dynamic typing
Variables refer to objects of arbitrary type.
Python does not check function arguments for type:
it's the responsibility of the caller.
Example 2: no privacy
All instance variables can be accessed directly,
even when design principles dictate that
some of them should be "private" (accessed only by methods).
It's the programmer's responsibility to keep track — this is where naming conventions
make a big difference!
Python 3 vs. Python 2
We are using Python version 3.2 in CSC 148 this term.
Beware: there are small incompatibilities between versions 2.x and 3.2!
Check the Python documentation (linked on the main website)
to find out more about those differences.