4.5.1 Indentation a block-delimiter

No students claimed to have trouble indenting and most said they understood its significance (see Figures 3.2 and 3.3). It was feared that Python's unique way of delimiting code blocks would be problematic. In fact many students expressed an appreciation of it, perhaps due to its intuitiveness; it is used in much the same way as a document written in English might be indented. Perhaps rather more infinite loops were encountered than usual, but not very many. In his report on using Python as an introductory language Jeff Elkner suggests a plausible explanation:

The idea of several statements acting as one takes some getting used to, and it appears the visual cues of a BEGIN and an END make it easier to understand[#!elkner!#]

However, as Elkner says, this is a price worth paying in return for consistent code layout. One of the most common problems for demonstrators when teaching Pascal (and one that would also be encountered in C) is students either not indenting their programs at all or, even worse, doing so inconsistently. This makes it more time-consuming for them to solve student's problems. Enforcing a consistent style on students from the start eliminated this entirely. It is a useful skill in preparation for other languages where, although not required, consistent and meaningful indentation is considered good practice.