Wednesday, 12 February 2014

3.1.2 Linked Lists


3.1.2 Linked Lists

- In Computer Science, a linked list is a data structure consisting of a group of nodes, which make a sequence.

- Each node is made up of some data and a reference, a link to the next node in the sequence.

3.1.2 Two Dimensional Arrays

3.1.2 Two Dimensional Arrays
A list of lists - E.g: (Darts)
Turn (a list of the scores of 3 darts in a players turn)
Leg (a list of the turns a player has in that leg)


19
60
20
20
20
60
60
60
60

3.1.2 Arrays (Known in Python as Lists)

Arrays, also know as "Table Arrays" are known as "lists" in python language.
- Arrays are lists of data that can be accessed by giving an index number.
- Indexing in a computer always begins with "0".

 E.g:
0
1
2
3
4
Mike
Sheila
Bruce
Shane
Mark

3.1.2 Data Structures

3.1.2 Data Structures

- Computer programming is all about creating a program to solve a problem or complete a task.


- Data structures are used to organize data, so it's easier to work with and is suitable for the computer to process.

Friday, 31 January 2014

3.1.1 Data Types

3.1.1 Data Types


Integer: Integers are whole, positive or negative numbers. 

For example: 1,2,3,4,5,6,7,8,-1,-2,-3,-4
Real/Floating point number: Decimal numbers. Used for times, exact measurements etc.  Floats are accurate but slow.
Date/Time: Used to store dates and times
For example: 11/06/2012, 
String: Strings are sequences of characters.  They can contain numbers, special characters and letters.  How are strings represented in Python?

3.1.1 The purpose of data types within code

What is the purpose of data types within code?

Below are the different types of data

.
Data can be stored in many different forms. A computer uses codes to keep track of different types of data it processes. different types of data are used to make the best use of memory space.

Friday, 24 January 2014

3.1.1 Naming Variables

Naming Variables

A variable can be as short as a single letter but can not be a single number. it can start with a "_" and then it can contain letters and numbers. e.g: _1g4, _123.
a good variable name has to be relevant to the information being sorted. If its a name you can name the variable  "Name"