Chapter 1 Python

 #■■ Chapter One ■■


# 1.Python Print


print('Hello World')


# 2.Module

'''

--> We can import a code written by someone in our code called as module

--> ex. { import <module_name>

               import tensorflow }

--> Extend the functionality of our code 

'''


# 3.Pips

'''

--> It install the modules in our computer from the internet.

--> ex. { pip install <module_name>

               pip install flask }

'''

#-------------------------------------------------

#● Print In Brief 


print('Hello World 2')  #✅


print('Helllo',

'world 3')                      #✅


'''print('Hello 

World 4') '''                      #❌


print("Hello World 5")   #✅


#print("Hello World 6").  #❌ Not Use Any character


#print("Hello World 7')     #❌ Not Valid Syntax


print('''Hello World 8''')     #✅ Also Use triple single quotation mark to represent a string , and it is mostly used to print  a line break texts(New Line Text)


print('''《Twinkle Twinkle 

Little Star

How i wonder

in the sky 》

''')                            #✅ Example of Above



#● Modules In Brief :- 

'''

□ Types Of Modules

1) Built In : Already installed while installing python.

ex. "OS", "ABC"


2) External : They are installed from internet externally using 'PIP'

ex. "Tenserflow", "Flask"


▪︎REPL : READ EVALUATE PRINT LOOP ▪︎

'''

#-------------------------------------------------

#Comments


''' 

# Single line comment 

--> { #Hello } This Is The single line comment you can use it anywhere

--> ex. 1) { print!('Hello World') } #OK

            2) #OK

--> No indentation matters for this you can write anywhere you want you can give as much spaces as you want

 '''

 

# Multi Line Comments 

print('5') 

''' wow    '''

#--> You Must start MLC from 1st Column of a line,if you gives spaces or tabs this is not valid gives indentation error

#--> You can't start MLC from middle of a line ,must have to start the MLC from 1st col of line,otherwise gives a `SYNTAX ERROR`


# ■■ Chapter One Ends ■■

إرسال تعليق

Post a Comment (0)

أحدث أقدم