1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
define code readability
ensuring any code written is easy to read and understand it is necessary as programmers usually work in teams with each programmer developing a different part of the program. This only works if they adopt a standard approach to writing readable code
what are the 4 techniques to improve code readability
comments: used to explain what each part of the program does
descriptive names: using descriptive identifiers for variables, constants and sub programs helps to make their purpose clear
indentation: makes it easier to see where each block of code starts and finishes. Getting indentation wrong in python will lead to program not running or not producing expected outcomes
white space: adding blank lines between different blocks of code makes them stand out
define block of code
a grouping of two or more code statements
how to write comments in python
starting the line of a comment with a # or *** for multiple line statements (end with *** as well)