Monday, 9 May 2011

research of other programming terms

Variables........................
According to processing variables mean.......... 
Variables are used for storing values. In this example, changing the 
values of variables 'a' and 'b' significantly change the composition.  
size(200, 200);
background(0);
stroke(153);

int a = 20;
int b = 50;
int c = a*8;
int d = a*9;
int e = b-a;
int f = b*2;
int g = f+e;

line(a, f, b, g);
line(b, e, b, g);
line(b, e, d, c);
line(a, e, d-e, c);
 
So this means that variables are things that hold values these values are 
replaced with letters and numbers which tells the computer that when you
see this number it means that it is a value. This function is useful when creating 
a code that has lots of one thing and enables the person who created the code 
to easily variate a value. for example if there where four boxes and the variable
said int apple= 4 and each box had four apples inside and someone decided to 
change int apple= 7, from 4 this would mean that 3 more apples will appear in 
each box by them without someone having to go round each box and put four
more apples inside......... 
This code is an example of how variables can be used  

No comments:

Post a Comment