2.1.2: understand the benefit of producing programs that are easy to read and be able to use techniques (comments, descriptive names (variables, constants, subprograms), indentation) to improve readability and to explain how the code works
Keyword | Definition |
---|---|
Comments | sections of code that aren't executed but that describe how the rest of the code works |
Constant | a value with a name, that is set once, before the program runs. It can be used multiple times but it's value never changes |
Descriptive names | identifiers for variables, constants and subprograms that describe what they store or do |
Indentation | using tabs and spaces to the left of a line of code to help show where it fits within the the structure of a program |
Subprogram | a procedure or function: a section of code with a name that can be reused multiple times |
Variable | a data structure with a name, that can store a value that might change while the program runs |