2014年1月27日 星期一

Week 4: Recursion

My second ever SLog!!


## all valuables are defined here

class CSC148:

    def SLog(week):
        """ Well, till now we've done a few programming labs for CSC148 and they actually help to understand much more about the concepts in class. LOL... these labs also help to recall my memories of "PROGRAMMING" =] haha'!
        """

        if csc148 is FUN:
            print ("I LOVE CSC148!")


## I'm not really really sure what do I mean :p

RECURSION?!

That's recursion:

    - a base case (the phone being hold)
    - a set of rules that reduce all other cases toward the base case (the other phone inside the phone (base case) and that phone inside in and so on...





This is how I understand this term ;]


More computer science speak ing:

    - the nested list is an good example >> list in a list in a list in a list...

    - i.e. L = [5, 40, [1, 3 , [9, 9 ,7, 4, 21, [ 9 ,5], 8], 4, 6, [1, 30]], 22, 63]



2014年1月21日 星期二

Week3: OOP

Ummm... My first programming related blog! Stepping into the third week of second semester, What have I learnt so far? Programming Of Course!!
Specificity, I've been learning about Class, Stack, and exception.
Class is a prototype for an object that defines a set of attributes and data that characterize any object of the class. So class one of the OOP.

Object-Oriented Program:
Object-oriented programming has its roots in the 1960s, but it wasn’t until the mid 1980s that it became the main programming paradigm used in the creation of new software. It was developed as a way to handle the rapidly increasing size and complexity of software systems, and to make it easier to modify these large and complex systems over time.  from: http://openbookproject.net/thinkcs/python/english3e/classes_and_objects_I.html 

  • There are valuable, which is data inside an object.
  • Methods are functions or procedures inside an object.
These are some of the most basic definitions of OOP.