Question 1
1 markWhen a programmer types code into an IDE, the keywords are automatically shown in a different colour and the lines inside each loop are automatically indented.
Identify the IDE function that does this.
Model answer
Prettyprint.
Explanation
Prettyprint formats the code so it is easier to read: it colours keywords, strings and comments differently and indents blocks of code automatically. It does not change what the program does, only how the code looks.
Mark scheme
-
1 mark
Prettyprint
accept 'pretty printing', 'pretty print'; accept 'syntax highlighting' only if it is also linked to indentation/formatting; do not accept 'code editor' on its own