Chapter 9. Just for You—Comments

Up until now, everything we have typed into our programs (and in interactive mode) has been instructions to the computer. But it’s a very good idea to include some notes to yourself in your programs, describing what the program does and how it works. This will help you (or someone else) look at your program later and figure out what you did.

In a computer program, these notes are called comments.

Adding comments

Comments are only for you to read, not for the computer to execute. Comments are part of the program’s documentation, and the computer ignores them when it runs your program.

Python has a couple of ...

Get Hello World! Computer Programming for Kids and Other Beginners now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.