Friday 24 January 2014

Except This! (Week 3)

   Exceptions are the bane of every student's programming life. Until this week we only knew just a handful of them which would usually come up every time I ran a code (IndentationError, SyntaxError being the most common ones). Now, we can even create them! By learning how to create them we also started delving into the concepts of inheritance and OOP. This is when the fun begins!

   I also would like to state how I implemented the Stack and Queue classes for the lab assignment. I basically used a binary tree consisting of duples as nodes for the Stack class and used linked list to implement the Queue class which resulted in better performance from the code. I also used an integer to solve the balanced parenthesis problem we discussed in class which was more efficient in space usage than a stack.

If you want more information about the implementations I would gladly send you the code! Til next time!

Yo check this sudoku solver written in python! http://norvig.com/sudoku.html