I found this exercise easy enough... or at least part 1. That part of the code ran first shot - how ever problems arose when I tried implementing the second part. For some reason, it would run for me when I tried it in the python shell yet it failed the majority of the auto-testers. I know my error was in the way I implemented the return statement and how it caught the wrong exception due to the inheritance of other Exceptions. Time to read up on inheritance...
Friday, 28 February 2014
PostingError
A little late, but I guess late is better than never! This blog covers material covered during week #4, which is the week that we had Exercise #2 due.
Thursday, 23 January 2014
Object-oriented programming! (creative title to come)
Welcome back!
So here is the first academic blog of the semester. This one
requires us to mention the concept of object-oriented programming so here it goes:
Object-oriented programming is a new concept to me. Through
research I have discovered that it is in many ways an extension, or
modification, of older programming techniques such as structured programming
and abstract data types. It carries over many similarities – and in some cases
inherits the same characteristics.
Where it differs is in the actual format of the program. Objected-oriented programs organize their code
and data around one central unit, otherwise known as an ‘object’. These
objects, or classes, provide a template for programmers to add code which can
modify the data in a clear, organized fashion. Code which modifies data, or
performs a required task is called a method.
I enjoy working with
Python, an objected-oriented programming, because it allows for a visually clear
and organized way to program. I find it easy to logically follow the concept of
a class. Take, for example, the concept of a class food; Vegetables would be a subclass of
food, on which we could employ various methods such as cooking, eating,
preparing etc. In many ways, such as the
example above, it allows programmers to consider objects as they would in the
real world; making it simpler and more straightforward to implement new methods
and functions within the given object much as they would in real life.
Hey - the awkward first post
Good afternoon!
I figured I needed a first post.. although I wasn't sure what to write in it. So here goes nothing!
As someone who did not really enjoy CSC108 last semester, I
am pleasantly surprised by how much I am currently enjoying this class. To say programming doesn’t come easily to me would be an
understatement. The computer labs in the Bahen center became my home last
semester – whenever we had assignments due I would literally camp out!
I walked in to my first two labs of this semester dreading
them – and found myself enjoying the challenge they presented. As an added
bonus I also managed to code a working program both times in the allotted two
hour time slot. Yay!
Part of course requires us to keep a blog going about our
thoughts and ideas about different topics pertaining to the material covered. That part starts in the next post!
Subscribe to:
Posts (Atom)