Exercise 2: Comments and Pound Characters
Tasks
-
Learn how to use comments in Python.
What I Did
In the text editor:
In the command:
What I Learned
-
Comments are used to tell you what something does in English so that you can understand the parts of script when you come back to them later.
-
Comments can also be used to comment out a piece of code, which means it will not be run in the command.
-
How to tell the computer what part of the code is a comment?
Put an # character in front of the line that you want to comment out or use as a comment.
-
The # character can be called octothrope, pound, hash, and mesh.