SlideShare a Scribd company logo
1 of 19
Raspberry Pi & Python Workshop
February 09, 2024
Topics that we’ll be covering today :
- Basics of Python
- Loops
- Conditionals
- Modules & Importing them
- Matplotlib Library
- Linux Commands
- Projects
- Password Manager
- PDF Password Encrypter
Basics of Python
Loops
Loop is a sequence of instructions that is continuously repeated until a certain
condition is reached.
We use loops, whenever we need to run the set of statements repeatedly.
There are 2 types of Loops in Python -
- For Loop
- While Loop
While Loop
- In Python, a while loop is used to execute a
block of statements repeatedly until a given
condition is satisfied. When the condition
becomes false, the line immediately after the
loop in the program is executed.
Syntax :
while expression:
statement(s)
- All the statements indented by the same
number of character spaces after a
programming construct are considered to be
part of a single block of code. Python uses
indentation as its method of grouping
statements.
For Loop
- For loops are used for sequential traversal.
For example: traversing a list or string or
array etc. In Python, there is “for in” loop
which is similar to foreach loop in other
languages. Let us learn how to use for loop in
Python for sequential traversals with
examples.
Syntax:
for iterator_var in sequence:
statements(s)
- It can be used to iterate over a range and
iterators.
Conditionals
If-Else statements in Python are part of conditional statements, which decide the
control of code.
Types of Conditionals
Python control flow statements are as follows:
- The if statement
- The if-else statement
- The nested-if statement
If Statement
- The if statement is the most simple decision-
making statement. It is used to decide
whether a certain statement or block of
statements will be executed or not.
Syntax:
if condition:
# Statements to execute if
# condition is true
- Here, the condition after evaluation will be
either true or false. if the statement accepts
boolean values – if the value is true then it
will execute the block of statements below it
otherwise not.
If - Else Statement
- The if statement alone tells us that if a
condition is true it will execute a block of
statements and if the condition is false it
won’t. But if we want to do something else if
the condition is false, we can use the else
statement with the if statement to execute a
block of code when the if condition is false.
Syntax of Python If-Else:
if (condition):
# Executes this block if condition is true
else:
# Executes this block if condition is false
Nested If Statement
A nested if is an if statement that is the target
of another if statement. Nested if statements
mean an if statement inside another if
statement.
Yes, Python allows us to nest if statements
within if statements. i.e., we can place an if
statement inside another if statement.
Syntax:
if (condition1):
# Executes when condition1 is true
if (condition2):
# Executes when condition2 is true
Modules
A Python module is a file containing Python definitions and statements. A module can
define functions, classes, and variables. A module can also include runnable code.
Grouping related code into a module makes the code easier to understand and use. It
also makes the code logically organized.
It basically a file containing different classes & functions that can be used by other
files. We design modules so to create an organized file system and access them
whenever we need to use certain functions from it.
Further, we’ll be referring to : https://www.geeksforgeeks.org/python-modules/
Matplotlib Library
Linux Commands
Linux Commands
ls Displays information about files in the current directory.
pwd Displays the current working directory.
mkdir Creates a directory.
cd To navigate between different folders.
rm Delete files
uname Command to get basic information about the OS
man Access manual for all Linux commands
ps Display the processes in terminal
Linux Commands
grep Search for a specific string in an output
echo Display active processes on the terminal
wget Download files from the internet.
mv Move the folder or file
whoami Create or update passwords for existing users
rmdir To delete a directory in the system
touch Creates an empty file
cat To create the file & display its content
Password Manager
PDF Password Encryption
Thankyou!!

More Related Content

Similar to RaspberryPi & Python Workshop Day - 02.pptx

Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3Isham Rashik
 
Programming in python - Week 4
Programming in python  - Week 4Programming in python  - Week 4
Programming in python - Week 4Priya Nayak
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diarySHARDA SHARAN
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experiencedzynofustechnology
 
BSc. III Unit iii VB.NET
BSc. III Unit iii VB.NETBSc. III Unit iii VB.NET
BSc. III Unit iii VB.NETUjwala Junghare
 
if else python.pdf
if else python.pdfif else python.pdf
if else python.pdfGshs6
 
Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov, Introduction to Python, Lecture2Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov, Introduction to Python, Lecture2Anton Kasyanov
 
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...jaychoudhary37
 
Control structures functions and modules in python programming
Control structures functions and modules in python programmingControl structures functions and modules in python programming
Control structures functions and modules in python programmingSrinivas Narasegouda
 
APP_Unit 1_updated.pptx
APP_Unit 1_updated.pptxAPP_Unit 1_updated.pptx
APP_Unit 1_updated.pptxgogulram2
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2sadhana312471
 
Decision and looping examples with php (WT)
Decision and looping examples with php (WT)Decision and looping examples with php (WT)
Decision and looping examples with php (WT)kunjan shah
 

Similar to RaspberryPi & Python Workshop Day - 02.pptx (20)

Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3
 
Programming in python - Week 4
Programming in python  - Week 4Programming in python  - Week 4
Programming in python - Week 4
 
Python Session - 4
Python Session - 4Python Session - 4
Python Session - 4
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diary
 
Python Interview Questions For Experienced
Python Interview Questions For ExperiencedPython Interview Questions For Experienced
Python Interview Questions For Experienced
 
Python Flow Control
Python Flow ControlPython Flow Control
Python Flow Control
 
BSc. III Unit iii VB.NET
BSc. III Unit iii VB.NETBSc. III Unit iii VB.NET
BSc. III Unit iii VB.NET
 
if else python.pdf
if else python.pdfif else python.pdf
if else python.pdf
 
Php, mysq lpart3
Php, mysq lpart3Php, mysq lpart3
Php, mysq lpart3
 
Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov, Introduction to Python, Lecture2Anton Kasyanov, Introduction to Python, Lecture2
Anton Kasyanov, Introduction to Python, Lecture2
 
python.pptx
python.pptxpython.pptx
python.pptx
 
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...
FAL(2022-23)_FRESHERS_CSE1012_ETH_AP2022234000166_Reference_Material_I_15-Nov...
 
Ch-4.pdf
Ch-4.pdfCh-4.pdf
Ch-4.pdf
 
Python loops
Python loopsPython loops
Python loops
 
Control structures functions and modules in python programming
Control structures functions and modules in python programmingControl structures functions and modules in python programming
Control structures functions and modules in python programming
 
APP_Unit 1_updated.pptx
APP_Unit 1_updated.pptxAPP_Unit 1_updated.pptx
APP_Unit 1_updated.pptx
 
These questions will be a bit advanced level 2
These questions will be a bit advanced level 2These questions will be a bit advanced level 2
These questions will be a bit advanced level 2
 
Decision and looping examples with php (WT)
Decision and looping examples with php (WT)Decision and looping examples with php (WT)
Decision and looping examples with php (WT)
 
R loops
R   loopsR   loops
R loops
 
C sharp chap4
C sharp chap4C sharp chap4
C sharp chap4
 

More from ShivanshSeth6

Python Workshop Day - 03.pptx
Python Workshop Day - 03.pptxPython Workshop Day - 03.pptx
Python Workshop Day - 03.pptxShivanshSeth6
 
RaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxRaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxShivanshSeth6
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringShivanshSeth6
 
Session on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxSession on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxShivanshSeth6
 
Design_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxShivanshSeth6
 
Cloud_Session_PPT.pptx
Cloud_Session_PPT.pptxCloud_Session_PPT.pptx
Cloud_Session_PPT.pptxShivanshSeth6
 
Info-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxInfo-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxShivanshSeth6
 

More from ShivanshSeth6 (7)

Python Workshop Day - 03.pptx
Python Workshop Day - 03.pptxPython Workshop Day - 03.pptx
Python Workshop Day - 03.pptx
 
RaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptxRaspberryPi & Python Workshop Day - 01.pptx
RaspberryPi & Python Workshop Day - 01.pptx
 
Android_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_EngineeringAndroid_Bootcamp_PPT_GDSC_ITS_Engineering
Android_Bootcamp_PPT_GDSC_ITS_Engineering
 
Session on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptxSession on Design_Discover_Develop_Campaign_2.pptx
Session on Design_Discover_Develop_Campaign_2.pptx
 
Design_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
 
Cloud_Session_PPT.pptx
Cloud_Session_PPT.pptxCloud_Session_PPT.pptx
Cloud_Session_PPT.pptx
 
Info-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptxInfo-Session-GDSC-ITSEngineeringCollege.pptx
Info-Session-GDSC-ITSEngineeringCollege.pptx
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 

RaspberryPi & Python Workshop Day - 02.pptx

  • 1. Raspberry Pi & Python Workshop February 09, 2024
  • 2. Topics that we’ll be covering today : - Basics of Python - Loops - Conditionals - Modules & Importing them - Matplotlib Library - Linux Commands - Projects - Password Manager - PDF Password Encrypter
  • 4. Loops Loop is a sequence of instructions that is continuously repeated until a certain condition is reached. We use loops, whenever we need to run the set of statements repeatedly. There are 2 types of Loops in Python - - For Loop - While Loop
  • 5. While Loop - In Python, a while loop is used to execute a block of statements repeatedly until a given condition is satisfied. When the condition becomes false, the line immediately after the loop in the program is executed. Syntax : while expression: statement(s) - All the statements indented by the same number of character spaces after a programming construct are considered to be part of a single block of code. Python uses indentation as its method of grouping statements.
  • 6. For Loop - For loops are used for sequential traversal. For example: traversing a list or string or array etc. In Python, there is “for in” loop which is similar to foreach loop in other languages. Let us learn how to use for loop in Python for sequential traversals with examples. Syntax: for iterator_var in sequence: statements(s) - It can be used to iterate over a range and iterators.
  • 7. Conditionals If-Else statements in Python are part of conditional statements, which decide the control of code. Types of Conditionals Python control flow statements are as follows: - The if statement - The if-else statement - The nested-if statement
  • 8. If Statement - The if statement is the most simple decision- making statement. It is used to decide whether a certain statement or block of statements will be executed or not. Syntax: if condition: # Statements to execute if # condition is true - Here, the condition after evaluation will be either true or false. if the statement accepts boolean values – if the value is true then it will execute the block of statements below it otherwise not.
  • 9. If - Else Statement - The if statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But if we want to do something else if the condition is false, we can use the else statement with the if statement to execute a block of code when the if condition is false. Syntax of Python If-Else: if (condition): # Executes this block if condition is true else: # Executes this block if condition is false
  • 10. Nested If Statement A nested if is an if statement that is the target of another if statement. Nested if statements mean an if statement inside another if statement. Yes, Python allows us to nest if statements within if statements. i.e., we can place an if statement inside another if statement. Syntax: if (condition1): # Executes when condition1 is true if (condition2): # Executes when condition2 is true
  • 11. Modules A Python module is a file containing Python definitions and statements. A module can define functions, classes, and variables. A module can also include runnable code. Grouping related code into a module makes the code easier to understand and use. It also makes the code logically organized. It basically a file containing different classes & functions that can be used by other files. We design modules so to create an organized file system and access them whenever we need to use certain functions from it. Further, we’ll be referring to : https://www.geeksforgeeks.org/python-modules/
  • 14. Linux Commands ls Displays information about files in the current directory. pwd Displays the current working directory. mkdir Creates a directory. cd To navigate between different folders. rm Delete files uname Command to get basic information about the OS man Access manual for all Linux commands ps Display the processes in terminal
  • 15. Linux Commands grep Search for a specific string in an output echo Display active processes on the terminal wget Download files from the internet. mv Move the folder or file whoami Create or update passwords for existing users rmdir To delete a directory in the system touch Creates an empty file cat To create the file & display its content
  • 16.