Exam 3 - generally went better than Exam 2.
Your final exam grade replaces the midterm grade component if it’s better
Schedule tweak: there is no E20. There is (still) a POTD 20.
E18T
when done, write:
def copy_list(in_list):
""" Return a new list object containing the same elements as in_list.
Precondition: in_list's contents are all immutable. """
# Example usage:
a = [1, 2, 3, 4]
b = copy_list(a)
b[0] = 0
print(a[0], b[0])
# prints 1, 0and
def cull(a):
""" Remove a randomly chosen half of the elements from the given list """
# Example usage:
a = [1, 2, 3, 4]
cull(a)
print(a)
# prints [2, 3] (or any other choice of 2 elements from the original list)P17
P18 setup