Chapter: Problem Solving and Python Programming : Data, Expressions, Statements

| Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail |

Comments - Python

A hash sign (#) is the beginning of a comment.

COMMENTS:

 

v   A hash sign (#) is the beginning of a comment.

v   Anything written after # in a line is ignored by interpreter.

Eg:percentage = (minute * 100) / 60        # calculating percentage of an hour

v   Python does not have multiple-line commenting feature. You have to

comment each line individually as follows :


Example:

#               This is a comment.

#               This is a comment, too.

#               I said that already.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail


Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.