This investigation concerned classroom learning of a computer programming course by Form 2 pupils in New Zealand Intermediate schools. Samples were employed representing the full range of ability levels found in such schools. The programming task was divided into a pre-coding phase and a coding phase and the capacity to perform the tasks relating to each of the two phases were postulated as separate abilities. This division was shown to be justified. Nevertheless, measures of the two abilities were found to be moderately correlated, end each also correlated moderately with a measure of mathematical attainment. Analysis of the results showed that these correlations were not due to general intelligence alone. The fine structure underlying the relationships was also examined. In the study, it was further shown that three measures of academic achievement predicted attainment in the programming course more effectively than fourteen personality measures. Some similarities and some differences were discovered between the results of this prediction study end similar studies with adults. Finally, two different teaching sequences were compared against each other and with a control group. It was established that mastery of the pre-coding phase of programming was improved by teaching, but that the place in the course where this teaching was given made no significant difference to end-of-course achievement. On the other hand, altering the timing of the instruction in the elements of the programming language was found to produce a significant difference in mastery of coding skills.