Wednesday, March 12, 2014

3.1.2 Classes

Classes can be though of like a template because classes allow you to put objects or things into catogories.
for example :

 Classes : Super, Sports and S-class
Vehicles = Bugatti, Nissan GTR , Lotus LFA

Buggati and Nissan GTR = Super

Lotus LFA = S-class

You can think of classes like animal groups too.
E.G :

Classes : Primates and Carnivora
Animals : Gibbon,Bobcat,Chimp and Brown Bear.

Gibbons and Chimps = Primates
Bobcat and Brown Bear = Carnivora

Sources = http://en.wikipedia.org/wiki/Class_(computer_programming)


Wednesday, February 12, 2014

3.1.3 Defining Flow Control

The start/end commands are symbolized as a oval.
The process command is symbolized as a rectangle.
The decision command is symbolized as a diamond .
Source : http://en.wikipedia.org/wiki/Control_flow

3.1.3 Program Flow Control

A sequence in program flow control is a set of instructions that are in order, every order is follows the previous.
(E.G : Go to school - Learn - Leave school )
A selection in program flow control  is a get of if statements that are followed by choice orders.
(E.G : would you like to turn the light off - Yes = light on  No = light off)

A Iteration in program flow control is is a set of instructions that can contain loops and repeating actions.
(E.G: Turn kettle on - Is there any water? - No =  go back to turn kettle on -Yes = Start boiling to 100 degrees - Has Water reached the temperature set? - no go back to start boiling to 100 degrees - yes = turn kettle off)

Source : http://en.wikipedia.org/wiki/Control_flow

Friday, February 7, 2014

3.1.2 Linked Lists

A linked list is quite self explanatory, it is a list attached to another list that gives following list information
for example:












Python does not use linked lists.

sources : http://en.wikipedia.org/wiki/Linked_list

Friday, January 31, 2014

3.1.2 Two Dimentional Arrays

Two dimensional arrays are list of lists. this means that it is constructed of multiple lists.
 In python a two dimensional array is used with rows for example row 1 is zero and the row contains letters. Lets say you want to select a letter such as b.
 you would say : print (letter[0][1])
 An example of two dimensional array in python is :
Useful link : http://www.processing.org/tutorials/2darray/

3.1.2 Arrays

Arrays also known as table arrays are lists of information that can be accessed by index numbers.
 Lists always begin with 0.,
For example: 0 1 2 Jim Jimmy Jamie
(0 = Jim 1 = Jimmy and 2 = Jamie
 The equivilent of arya in python are called lists. Lists in python can be different, for example there are 2 dimentional arrays( Covered in the next post) and 3 dimentional arrays. 3 Dimentional arrays in python are basicly a list inside a list inside a list, for example : day [Monday, Tuesday, Wednesday, Thursday ,Friday] week [One,Two,Three,Four,Five] year [2000,2001,2002,2003,2004] Year info = ("Thursday" "Four" "2003")

3.1.2 Data Structures

Computer programming is about creating instructions to do tasks such as problem solving or to complete a task.
Data structures can help organise data. so that is easier to use and that is is suitable for computer processing. Data structures in python are called lists.
 For example: cars = ["Subaru Imprezza 2004","Maclaren F1","Sesto Elomento"]


Useful webpage :http://en.wikipedia.org/wiki/Data_structure