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"

3.1.1 The Difference between a variable and a constant

What is the difference between a variable and a constant?

In maths and computing, a variable is a symbol, number ore letters that represent a value.
Python variables are like this:

name = “Bob the builder”

A variable is something that needs to change though out the program.
A constant is something that needs to stay the same and can't change. In the c programming language a constant looks like this: 
int const a = 1;

Click here to read more about it.

Thursday 23 January 2014

3.1.1 Data and Information

What is the difference between data and information?

Data is facts or statistics that are out of context, it means nothing on its own. e.g: 12.6, 1223, 562B
Data turns in to information when it is labeled and put in to context. e.g: lap times = 121.64, 126.91, 125.46
Information can be a words, pictures or sequence of numbers that are in context.
Example of data:









Click this to read more about it.