Sunday, 20 February 2011

Array

Array Example

Dim Grade (13) as string
Dim index as Integar
For Index = 0 to 13
                                             
Student.Grade (Index) = "A"
        Grade (B)
Next

Loops

There are three types of loops:
1.) For...Next
2.) Loop...Until
3.) Do While

The Loops all preform similar things, but each one is more specialised at different things than the others.

For...Next
Used to run a piece of code a which is a fixed number. As its name suggest, it is used when a function needs to be carried out FOR each of several items, which is identical processing. The For...Next loop changes a variable every time it runs, so that the function can be specialised for each item.

Loop...Until loop
Target loop, keeps looping until target is reached

Do While
Runs a piece of code that reacts to change, is sensor and monitors change.

Wednesday, 16 February 2011

Computer Science for 2011 Mr Wells Class

Homework:
1.) Post something on our blog
2.) Do Program 7.1 Multiplication (Table page 75)