SlideShare a Scribd company logo
1 of 8
Python Training by
SoftCrayons Institute
Learn Python from industry experts at SoftCrayons Institute.
Introduction
to Python
• Python is a high-level, interpreted programming language that is easy
to learn and widely used in the industry. It was created by Guido van
Rossum in 1991 and is named after the British comedy group Monty
Python. Python is known for its simplicity, readability, and ease of use,
making it a popular choice for beginners and experienced programmers
alike.
• Why Python?
• Python has a large and active community of developers, which means
there are many resources available for learning and troubleshooting. It
also has a vast standard library that makes it easy to perform tasks such
as file I/O, network communication, and web scraping. Python is used in
a variety of fields, including web development, data analysis, machine
learning, and scientific computing.
Data Types and Variables
Python is a dynamically typed language, which means that the data type of a variable is inferred at runtime. Some of the
commonly used data types in Python include:
•Integers (int)
•Floating-point numbers (float)
•Strings (str)
•Booleans (bool)
Variables
In Python, variables are used to store values. A variable is created when a value is assigned to it using the
assignment operator (=). Variables can be of any data type and can be reassigned to different values.
For example:
x = 5 y = 3.14 z = 'hello’
print(x)
print(y)
print(z)
x = 'world' print(x)
Control Structures
• Conditional Statements
• Conditional statements in Python are used to execute
different actions based on different conditions. The most
common conditional statements in Python are if, else,
and elif. These statements allow you to create decision-
making processes in your code.
• Loops
• Loops in Python are used to execute the same block of
code repeatedly. There are two types of loops in Python:
while loops and for loops. While loops are used when you
want to repeat a block of code until a certain condition is
met. For loops are used when you want to iterate over a
sequence of elements, such as a list or a string.
Functions and Modules
FUNCTIONS INTRODUCTION TO FUNCTIONS,
DEFINING AND CALLING
FUNCTIONS, PARAMETERS AND
ARGUMENTS, RETURN STATEMENT,
LAMBDA FUNCTIONS, RECURSION.
MODULES INTRODUCTION TO MODULES,
IMPORTING MODULES, CREATING
AND USING CUSTOM MODULES,
BUILT-IN MODULES.
File Handling
• Introduction
• File handling is an essential part of programming in Python. It allows you to read and write data to and from
files on your computer. Python provides a variety of functions and modules to handle files easily.
Opening and Closing Files
You can open a file in Python using the built-in open() function. This function takes
two arguments: the name of the file and the mode in which you want to open the
file. The mode can be 'r' for reading, 'w' for writing, or 'a' for appending to an
existing file. Once you have finished working with a file, you should always close it
using the close() method.
Example
Here is an example of opening a file in read mode and closing it:
file = open('example.txt', 'r') # Do some operations on the file file.close()
• Reading from Files
• You can read data from a file using the read() method.
This method reads the entire contents of a file and
returns it as a string. You can also use the readline()
method to read a single line from a file.
Writing to Files
You can write data to a file using the write() method. This method takes a string as an argument and writes it to
the file. If the file does not exist, it will be created. If it does exist, the new data will overwrite the old data. You can
also use the writelines() method to write a list of strings to a file.
Example
Here is an example of writing to a file:
file = open('example.txt', 'w') file.write('Hello, world!') file.close()
And more
Advanced Topics in Python
Learn with Softcrayons
Support Contact
PhoneMobile : +91 8545012345
Hotline : +91 8545012345
Emailinfo@softcrayons.com
Noida LocationB-132 Sector -2 (Near Sector- 15 Metro Station) Noida 201301
Ghaziabad Location693, Sector-14A, Opposite Sahibabad Sabji Mandi, Vasundhara, Ghaziabad (U.P.) 201012

More Related Content

Similar to Python Training

Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
Programming Language
Programming  LanguageProgramming  Language
Programming LanguageAdeel Hamid
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programmingChetan Giridhar
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1Ahmet Bulut
 
Introduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonIntroduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonJen Stirrup
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way PresentationAmira ElSharkawy
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python ProgrammingDozie Agbo
 
INTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptxINTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptxNimrahafzal1
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshopamptiny
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 

Similar to Python Training (20)

Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
Programming Language
Programming  LanguageProgramming  Language
Programming Language
 
bhaskars.pptx
bhaskars.pptxbhaskars.pptx
bhaskars.pptx
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 
Python Workshop
Python WorkshopPython Workshop
Python Workshop
 
Introduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and PythonIntroduction to Analytics with Azure Notebooks and Python
Introduction to Analytics with Azure Notebooks and Python
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
 
Python 01.pptx
Python 01.pptxPython 01.pptx
Python 01.pptx
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
INTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptxINTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptx
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & style
 
20120314 changa-python-workshop
20120314 changa-python-workshop20120314 changa-python-workshop
20120314 changa-python-workshop
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Unit V.pptx
Unit V.pptxUnit V.pptx
Unit V.pptx
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Python Training

  • 1. Python Training by SoftCrayons Institute Learn Python from industry experts at SoftCrayons Institute.
  • 2. Introduction to Python • Python is a high-level, interpreted programming language that is easy to learn and widely used in the industry. It was created by Guido van Rossum in 1991 and is named after the British comedy group Monty Python. Python is known for its simplicity, readability, and ease of use, making it a popular choice for beginners and experienced programmers alike. • Why Python? • Python has a large and active community of developers, which means there are many resources available for learning and troubleshooting. It also has a vast standard library that makes it easy to perform tasks such as file I/O, network communication, and web scraping. Python is used in a variety of fields, including web development, data analysis, machine learning, and scientific computing.
  • 3. Data Types and Variables Python is a dynamically typed language, which means that the data type of a variable is inferred at runtime. Some of the commonly used data types in Python include: •Integers (int) •Floating-point numbers (float) •Strings (str) •Booleans (bool) Variables In Python, variables are used to store values. A variable is created when a value is assigned to it using the assignment operator (=). Variables can be of any data type and can be reassigned to different values. For example: x = 5 y = 3.14 z = 'hello’ print(x) print(y) print(z) x = 'world' print(x)
  • 4. Control Structures • Conditional Statements • Conditional statements in Python are used to execute different actions based on different conditions. The most common conditional statements in Python are if, else, and elif. These statements allow you to create decision- making processes in your code. • Loops • Loops in Python are used to execute the same block of code repeatedly. There are two types of loops in Python: while loops and for loops. While loops are used when you want to repeat a block of code until a certain condition is met. For loops are used when you want to iterate over a sequence of elements, such as a list or a string.
  • 5. Functions and Modules FUNCTIONS INTRODUCTION TO FUNCTIONS, DEFINING AND CALLING FUNCTIONS, PARAMETERS AND ARGUMENTS, RETURN STATEMENT, LAMBDA FUNCTIONS, RECURSION. MODULES INTRODUCTION TO MODULES, IMPORTING MODULES, CREATING AND USING CUSTOM MODULES, BUILT-IN MODULES.
  • 6. File Handling • Introduction • File handling is an essential part of programming in Python. It allows you to read and write data to and from files on your computer. Python provides a variety of functions and modules to handle files easily. Opening and Closing Files You can open a file in Python using the built-in open() function. This function takes two arguments: the name of the file and the mode in which you want to open the file. The mode can be 'r' for reading, 'w' for writing, or 'a' for appending to an existing file. Once you have finished working with a file, you should always close it using the close() method. Example Here is an example of opening a file in read mode and closing it: file = open('example.txt', 'r') # Do some operations on the file file.close()
  • 7. • Reading from Files • You can read data from a file using the read() method. This method reads the entire contents of a file and returns it as a string. You can also use the readline() method to read a single line from a file. Writing to Files You can write data to a file using the write() method. This method takes a string as an argument and writes it to the file. If the file does not exist, it will be created. If it does exist, the new data will overwrite the old data. You can also use the writelines() method to write a list of strings to a file. Example Here is an example of writing to a file: file = open('example.txt', 'w') file.write('Hello, world!') file.close()
  • 8. And more Advanced Topics in Python Learn with Softcrayons Support Contact PhoneMobile : +91 8545012345 Hotline : +91 8545012345 Emailinfo@softcrayons.com Noida LocationB-132 Sector -2 (Near Sector- 15 Metro Station) Noida 201301 Ghaziabad Location693, Sector-14A, Opposite Sahibabad Sabji Mandi, Vasundhara, Ghaziabad (U.P.) 201012