My notebook-Exercise 2: Comments and Pound Characters

Exercise 2: Comments and Pound Characters

Tasks

  • Learn how to use comments in Python.

 

What I Did

In the text editor:

My notebook-Exercise 2: Comments and Pound Characters

In the command:

My notebook-Exercise 2: Comments and Pound Characters


What I Learned

  1. 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. 

  2. Comments can also be used to comment out a piece of code, which means it will not be run in the command.

  3. 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. 

    1. The # character can be called octothrope, pound, hash, and mesh.

My notebook-Exercise 2: Comments and Pound Characters

上一篇:jupyter lab 错误: TypeError: required field "type_ignores" missing from Module


下一篇:程序结构