The next stage of object oriented programming that we've gone through is exceptions. Calling exceptions is one of the more interesting processes of python programming that I've undertaken so far because of the way it's formatted.
It is the only process that requires sub classes, and even sub classes of our sub classes that I've done, so it is a bit of a learning curve. The process is logical, but the try/except concept took me awhile to understand. I guess the best way to think of it is with proper English syntax: try this code, and if it causes an error, raise said exception. Other than that, the same processes for coding that I've done so far continue to happen.
ALSO, Turtles.This is the first time I've used turtles for drawing, or even the first time I knew that graphical design was actually possible within python. Via analysis of the code involved with the Turtle Class, I did not think that a lot of the stuff that can happen, would even be possible. It is really cool how colours are assignable, and even how lengths, and direction can be customized. In class, we went over the example of the turtle tree. The process and code all made sense, but my professor said there was a more efficient way to use Turtles with recursion. I guess that's a lesson for next week. All in all, Turtles are really cool, I want to learn more.
No comments:
Post a Comment