PRINT FUNCTION PYTHON
COMMENTS IN PYTHON

What is Function ?

A function is a block of statements, reusable code that is used to perform a single task.

Print Function In Python

Python’s print() function prints the given object on the screen or other standard output devices.

Parameters Of Print Function In Python

  • Object – That object / variable you want to print.
  • sep (Optional Parameter) – objects are separated by sep. Default value: ‘ ‘
  • end (Optional Parameter) – end is printed at last. Default value is \n

Return

Print Function does not return any value.

Examples of Print Function

print("Python is Awesome")  
  
a = 7  
# 2 objects passed  
print("a =", a)  
  
b = a  
# 3 objects passed  
print('a =', a, '= b')  

Comments In Python

There are 3 ways of creating comments in Python.

First Way:

# This is a comment -> Using Hash Symbol

Second Way:

  “ “ “This is a 
    multiline
    comment. “ “ “

Using Triple Times Double Quotes On the Start and End.

Third Way:

  ‘ ‘ ‘ This is also a
     multiline
     comment.’ ‘ ‘

Using Triple Times Single Quotes On the Start and End.

PyCharm ShortCut For Comment And Un-Comment

Short-Cut of comment and un-comment in py-charm is ctrl + /

Click Below Link to Download Notes Of This Blog

https://www.mediafire.com/file/lim2qa6wwmnjh58/PRINT+FUNCTION+-+COMMENTS+IN+PYTHON.pptx/file

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *