Introduction to Programming

>>>Comment on these pages<<<

Read this first

These pages are a way of starting to learn to write computer programs. If you have never written a program before, or if you are in the middle of a programming course and you just don't get it, try these. If you are smart but you don't get the idea of programming, these pages are for you. If you are already a competent programmer I don't think you'd learn anything.

You should find they start easy, and if you work through them, you should find they pretty much stay that way. Work through them in order - do not pick and choose ones that sound 'interesting'. If they seem boring, programming is probably not your thing.

When you've gone all the way through, and they make sense, start learning a specific language like Visual Basic, C or Java. If it doesn't make sense, choose a different subject to study.

These pages use JavaScript, so your browser needs to be set to allow that. In MS Internet Explorer 7, it will probably initially block these scripts, and you'll have to tell it to accept them. If you use Firefox, Opera or Safari you won't have that problem.

Phase One

This is about the idea of variables, loops and conditional statements. Work through all of these in sequence. Do not be put off by the titles.

Step 1 Variables, assignments and output
Step 2 Input
Step 3 Increment variable
Step 4 Repeated statement
Step 5 Loop with counter
Step 6 Loop with accumulation
Step 7 Loop repetition depends on input
Step 8 Loop processing input stream
Step 9 Conditional statement
Step 10 Finding extreme in input stream
Step 11 Searching for target
Step 12 Swap
Step 13 While loop
Step 14 Nested loops

Phase 2

Step 15 Array referencing
Step 16 Filling arrays
Step 17 Searching
Step 18 Counting
Step 19 Summing
Step 20 Traversing
Step 21 Sorting