Class Notes (834,971)
Canada (508,836)
Computing (443)
CISC 121 (27)
Lecture

4.1.pdf

1 Page
87 Views
Unlock Document

Department
Computing
Course
CISC 121
Professor
Robin W Dawes
Semester
Winter

Description
Pro-tip: Try to avoid referencing global variables if possible. 4.1 Tuesday, January 29, 2013 9:35 AM Execution stack (frame stack) def fun_a(a, b) a = 3+a b = b-4 print a, b a = 9 b = 7 print a, b fun_1(a, b) print a, b Task - > Find the intersection of 2 lists (all values that are in both lists) list_1 = [4, 3, 7, 12, 10, 8] list_2 = [6, 9, 3, 8, 7, 4] inter = [] for i in range(len(list_1)) if list_1[i] in list_2: inter.append(list_1[i]) print inter Pretty good for non-Python for i in l
More Less

Related notes for CISC 121

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit