Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 3 (due the week of October 15th 19th)
At the top of your assignment, please write your fu

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 2 (due the week of October 8th 12th)
At the top of your assignment, please write your ful

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 1 (due the week of September 24th 28th)
At the top of your assignment, please write your

13-11-3
CSC108H: Assignment 1
Assignment 1: Strings and Lists
Due: Electronically, by 5:00 PM on November 7, 2013
Edit: 2013-10-19. Added text to definition of encrypt_letter
Introduction
The goal of this assignment is to gain practice with some important

6.00 Quiz 1, 2010
-Name
This quiz was given in the fall of 2010. Note that some of the material related to
computational complexity will be covered in lecture 8 this term.
This quiz is open book and open notes, but do not use a computer.
Answer all questi

Admin
DocTest
Black/White Box
Break
Testing Methods
CSCA08 FALL 2013
W EEK 9 - T ESTING
Brian Harrington
University of Toronto Scarborough
November 4 - 8, 2013
Break
UnitTest
Admin
DocTest
Black/White Box
Break
A DMIN S TUFF
A1 - Due Thursday
A1 Code Re

Admin
A2
Class
Break
Object-Orientation
Terminology
CSCA08 FALL 2013
W EEK 10 - C LASSES
Brian Harrington
University of Toronto Scarborough
November 11 - 15, 2013
Objects
Break
init & str
Admin
A2
Class
Break
Object-Orientation
A DMIN S TUFF
A1 - Code Re

Admin
Files
File I/O
NoneType Return
Break
Memory Model
CSCA08 FALL 2013
W EEK 7 - F ILES & M UTABILITY
Brian Harrington
University of Toronto Scarborough
October 21 - 25, 2013
Aliasing
Break
Cloning
Admin
Files
File I/O
NoneType Return
Break
Memory Model

Admin
Exercise Solutions
Break
Loops & Selection
Break
More Loops & Ifs
CSCA08 FALL 2013
W EEK 6 - C ATCH - UP, C OMBINING L OOPS & S ELECTION
Brian Harrington
University of Toronto Scarborough
October 7 - 11, 2013
Admin
Exercise Solutions
Break
Loops & S

Admin
Midterm
Tuples
Break
Sets
Break
CSCA08 FALL 2013
W EEK 8 - T UPLES , S ETS & D ICTIONARIES
Brian Harrington
University of Toronto Scarborough
October 28 - November 1, 2013
Dictionaries
Admin
Midterm
Tuples
Break
Sets
Break
Dictionaries
A DMIN S TUFF

6.00 Quiz 1, 2011
1.
_/15
2.
_/10
3.
_/10
4.
_/18
5.
_/8
6.
_/13
7.
_/15
8.
_/9
9.
-Name
_/1
10.
_/1
Total _ /100
This quiz is open book and open notes, but do not use a computer.
Please write your name on the top of each page. Answer all questions in the

Admin
Strings
Lists
Break
While Loops
For Loops
CSCA08 FALL 2013
W EEK 5 - L OOPS
Brian Harrington
University of Toronto Scarborough
September 30 - October 4, 2013
Break
For Loops contd
Admin
Strings
Lists
Break
While Loops
For Loops
Break
For Loops contd

Admin Commenting Break Design Recipe Acronym Contest Break Booleans Boolean Logic Booleans + Functions
CSCA08 FALL 2013
W EEK 3 - C OMMENTING , D ESIGN R ECIPE AND B OOLEAN
L OGIC
Brian Harrington
University of Toronto Scarborough
September 16-20, 2013
Ad

Admin
Style
DocTest
Break
Selection
CSCA08 FALL 2013
W EEK 4 - S ELECTION
Brian Harrington
University of Toronto Scarborough
September 16-20, 2013
Break
Selection
Admin
Style
DocTest
Break
Selection
Break
Selection
A DMIN S TUFF
Exercise 2 and Assignment

Python Quick Reference Guide
Overview
Python is a powerful, object-oriented open-source scripting language that is in use all over the world. In
Iguana and Chameleon, you can write Python scripts that allow you to manipulate HL7 message data.
The followin

A Byte of Python
Swaroop C H
A Byte of Python
Swaroop C H
Copyright 2003-2005 Swaroop C H
Abstract
This book will help you to learn the Python programming language, whether you are new to computers
or are an experienced programmer.
This book is released u

Admin
Types
Variables
Break
Functions
Break
CSCA08 FALL 2013
W EEK 2 - E XPRESSIONS , VARIABLES AND F UNCTIONS
Brian Harrington
University of Toronto Scarborough
September 9-13, 2013
Scope
Admin
Types
Variables
A DMIN S TUFF
Exercise 0 is now out
Due Su

Welcome
Introduction
Administrative Info
Academic Integrity
Break
CSCA08 FALL 2013
W EEK 1 - W ELCOME
Brian Harrington
University of Toronto Scarborough
September 3, 2013
Algorithms
Python
Welcome
Introduction
Administrative Info
Academic Integrity
Break

def useless (a,b,c):
return'That was a waste of time'
def square_me(y):
return y*y
def student_data(n,a,s,e):
result = '<'
result += s + ','
result += n + ','
result += str(a) + ','
result += str(e)
result += '>'
return result

# Global variables. Feel free to play around with these
# but please return them to their original values before you submit.
a0_weight = 5
a1_weight = 8
a2_weight = 10
midterm_weight = 20
exam_weight = 45
exercises_weight = 12
a0_max_mark = 25
a1_max_mark

def percent_to_gpv (x):
'
x must be integer in domain [0,100]
'
if x >= 85 and x <= 100:
return 4.0
if x >= 80 and x <= 84:
return 3.7
if x >= 77 and x <= 79:
return 3.3
if x >= 73 and x <= 76:
return 3.0
if x >= 70 and x <= 72:
return 2.7
if x >= 67 and

def insert(listA,listB,index):
'(list,list,int)->list
Insert listB into listA at the index, and return the result.
> insert([1, 2, 3], ['a', 'b', 'c'], 2)
[1, 2, 'a', 'b', 'c', 3]
'
#copy over everything before the index
if(type(listA)=list and type(listB

def copy_me(my_list):
'(list)-> str
If elements in the list are strings, change their letters converted to
upper-case.
Besides,Integers and foats are increased by 1,booleans are negated ,lists
are replaced with the word "List"
>copy_me(["helloworld", 24,

class TestSqueal(unittest.TestCase) :
def test_cartesian_product_booth_table_single_value(self) :
tableA = cfw_"a":[1]
tableB = cfw_"b":[2]
res = f.cartesian_product(tableA, tableB)
self.assertEqual(res, cfw_"a":[1],"b":[2],
"That's not the table we want"

def useless(a,b,c) :
return "That was waste of time"
def square_me(x) :
return x*x
def student_data(a,b,c,d) :
result = '<'
result += c + ','
result += a + ','
result += str(b) + ','
result += str(d)
result += '>'
return result

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 4 (due the week of October 22nd 26th)
At the top of your assignment, please write your fu

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 6 (due the week of Nomber 19th 23rd)
At the top of your assignment, please write your ful

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 5 (due the week of October 29th November 2nd)
At the top of your assignment, please write

Instructor: Leo Goldmakher
University of Toronto Scarborough
Department of Computer and Mathematical Sciences
MATA31 Calculus I for Mathematical Sciences
Problem Set 7 (due the week of Nomber 26th 30th)
At the top of your assignment, please write your ful