On Wednesday, our prof spends a lecture wrapping up the main
key concepts we needed to know for the exam. Concepts such as object oriented
programming, abstract data type, inheritance, raise exception, try and except
exceptions, unittest, recursion, binary tree, linked list, and run time analysis
were covered as topics to review for the exam. During the lecture we discussed
on each of these topics based on how they were relevant to programming and how
they were used in python programming. Also, our prof explained the format of
the exam paper as well as what to do and not to do. Up to this point, the
course is pretty much finished except for the final exam. Although we had spent
large amount of time analyzing algorithms, I still require more practice to
fully grasp the concept of analyzing algorithms. Throughout this semester, I gained
better understanding on many computing techniques that I am inexperienced at
the beginning of this year. With the time left until the final exam, I will
review all of the concepts I learned in this course and re-attempt questions appeared
on tests and labs to prepare for the exam.
Wednesday, 2 April 2014
SLOG # 10:
At the beginning of this week, we discussed on why objects
such as a list cannot be stored as key values of a dictionary. When {[1, 2]: 1}
for instance was to be tested in the python shell, it will return an error
saying list is unhashable type. Python dictionaries use objects that are
hashable as key values to avoid mutability of a mutable object, so errors will
not occur. Hashable object is defined to be an object that never changes and
can be compared to other objects. Since mutable objects such as lists do not
have the characteristics of a hashable object, then these objects cannot be
used as key values for a dictionary.
Subscribe to:
Posts (Atom)