Making code readable
-
Meaningful variable names.
-
Variables are not reused for different things.
-
Variables are defined in lowercase snake_case.
-
Good use of lines of whitespace to separate program elements.
-
Whitespace separating operators from operands.
-
Whitespace consistently around the assignment operators.
-
Named constants instead of magic numbers.
-
Constants defined in uppercase snake_case.
-
Inputting has a prompt message that ends with a space.
-
No operations within a
print()
statement.
-
Only use input() function when a user response is to be gotten.
-
Complicated expressions are broken up into multiple statements.
-
No excessively long statements.
-
Sufficient commenting for reader to understand different program elements.
-
No inappropriate comments, statements, or output.
-
Debugging code removed.