Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
Operation
Notation
empty list, list with E, list with E, F,
[] , [E], [E, F], [E, F, G],
index list L at I
L[I]
select sux of L starting at I
L[I

Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
Total functions return the correct result for all possible inputs, partial functions only
for inputs within their domain. Any restriction on the input sho

Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
Data on computers is stored in
les. These can be either humanly
readable text les or binary les.
Text les can be opened for either
reading or writing a

Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
Everything in Python is an object. Every object is an instance
of a class. The function type returns the name of the class. This
is not only the case f

Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
"There are only 10 types of people in the world:
those who understand binary and those who don't"
Integer a is an approximate square root of n if
a2 n

Emil Sekerinski, McMaster University, Winter Term 15/16
COMP SCI 1MD3 Introduction to Programming
Consider ooding a valley (dam
break, tides, spring): what is the
water level at specic points in the
valley after some time?
Similar problems are: oi