4.2.1
Comments
Comments
Comments
Comments are lines of code that are ignored completely by the computer.
How to comment
How to comment
- To write a comment in most languages, you must use a special character which tells the computer to ignore the rest of the line:
- In Python, that character is a #.
Interfaces
Interfaces
- An interface is a collection of comments which describe a subroutine.
- An interface includes:
- List of parameters and their types.
- Return value and its type.
- What the subroutine does.
1Introduction to Python
1.1Python
1.2Input & Output
1.3Data Types
1.4Variables & Constants
1.6Program Flow
2Data Structures
2.1Lists & Strings
2.2File Handling
3Modularity
3.1Subroutines
3.2Data Flow
4Good Practice
4.1Naming & Whitespace
4.2Comments
4.3Exceptions
Jump to other topics
1Introduction to Python
1.1Python
1.2Input & Output
1.3Data Types
1.4Variables & Constants
1.6Program Flow
2Data Structures
2.1Lists & Strings
2.2File Handling
3Modularity
3.1Subroutines
3.2Data Flow
4Good Practice
4.1Naming & Whitespace
4.2Comments
4.3Exceptions
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered
What are comments?