Print Function

#To print something in Python, we write print( )

#print is a function to perform any task.

print("Hello World")                                    #output - Hello World

#We use double quotes " " to make the object valid and to make it a string.

#We can also use single quotes ' ' for the same.

print('Hello World')                                      #output = Hello World

print(5)                                                         #output - 5

#We didn't use double quote or single quote here as 5 is a number(a valid object)

#To print multiple lines in print function, we use triple single or double quotes.

print('''Hi

How are you?

I am good, Thank you'''

print("Bye")                                                #output - Bye

print(111*222)                                           #output - 24642

print("My name is Sindhu")                      #output - My name is Sindhu

#For addition +

#For subtraction -

#For multiplication *

#For division /

Comments

Post a Comment

Popular posts from this blog

Arithmetic Operators

Sets in Python