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

Thursday, January 30, 2014

3.1.1 Variables

A Variable in a computer can be seen as a bucket( or an envelope) because information can be stored and maintained.
You can think that a variable is like a bucket or an envelope because you can store stuff in a bucket and in a envelope ( just imagine the stuff is data when thinking it as a variable).
The bucket is named after the variable.
 For example bucket = Name
When you are referring to a bucket you use the name of the bucket, not the information stored in it.
for example :
age = 17 (age is the bucket, 17 is the information stored inside of it)
name = Sam (name is the bucket, Sam is the information stored inside of it)
dob= 03/09/1995 (dob is the bucket, 03/09/1995 is the information stored inside of it)

Source :http://python4kids.wordpress.com/2010/07/07/some-foundations-variables-and-stuff/