Week 8 Python Comments
Week 8 Python Comments
Keywords –
comments, readability, interpreter, executed
Part 3.1 – Comments
What are comments in programming?
• Comments in Python is the inclusion of short descriptions along with the
code to increase its readability.
• A developer uses them to write his or her thought process while writing
the code.
• It explains the basic logic behind why a particular line of code was
written.
• Comments are just meant for the coders themselves or other developers to
understand a piece of code.
Part 3.1 – Comments
What are the uses of comments in programming?
• Comments in Python are identified with a hash symbol, #,
and extend to the end of the line.
• Hash characters in a string are not considered comments,
however.
• There are three ways to write a comment - as a separate
line, beside the corresponding statement of code, or as a
multi-line comment block.
Part 3.1 – Comments
What are the uses of comments in programming?