So we have done with installing python IDE. Now we are going to discuss about comments.
Comments are that code in our python program that is ignored by the python interpreter. Comments are very useful in understanding the program very easily. In python we have several ways in which we can comment the code.
1.Single line comment: Single line comment can be made by putting # symbol. For example
#This script is written by me
2.Multi line Comments: Multi line comment can be given in two ways
''' this is multi
line comment'''
"""this is also
multi
line comment"""
First Program in Python
We want to print only "hello world" in our first Python program. The script is very simple you need not to include anything in your program.
print("hello world")
Output: hello world
It is just a single line code. Now you can imagine how easy is to learn Python language and believe me if python is your first language you will love it and grab it very easily without the prior knowledge of any programming language.
Comments are that code in our python program that is ignored by the python interpreter. Comments are very useful in understanding the program very easily. In python we have several ways in which we can comment the code.
1.Single line comment: Single line comment can be made by putting # symbol. For example
#This script is written by me
2.Multi line Comments: Multi line comment can be given in two ways
''' this is multi
line comment'''
"""this is also
multi
line comment"""
First Program in Python
We want to print only "hello world" in our first Python program. The script is very simple you need not to include anything in your program.
print("hello world")
Output: hello world
It is just a single line code. Now you can imagine how easy is to learn Python language and believe me if python is your first language you will love it and grab it very easily without the prior knowledge of any programming language.
Be First to Post Comment !
Post a Comment