June 2017
Beginner
320 pages
7h 37m
English
Comments are very important in your programs. They are used to tell you what something does in English, and they are used to disable parts of your program if you need to remove them temporarily. Here’s how you use comments in Python:
ex2.py
1 # A comment, this is so you can read your program later.2 # Anything after the # is ignored by python.34 print("I could have code like this.") # and the comment after is ignored56 # You can also use a comment to "disable" or comment out code:7 # print("This won't run.")89 print("This will run.")
From now on, I’m going to write code like this. It is important for you to understand that everything does not have to be ...
Read now
Unlock full access