SlideShare a Scribd company logo
1 of 13
PYTHON
Information available in audio.
PRESENTED TO
PRESENTED BY
Introduction to Python
Agenda
• What is Python?
• History of Python
• Frameworks for Python
• Flavors of Python
• Why Python
• Data Types and Variables
• String
• Tuple
• Lists
What is Python
An interpreted, high-level programming language for general-purpose
programming
• Platform independent
• Dynamic typing
• Automatic memory management
• Adding or changing functions at runtime
• may use elements of natural language
• Strong abstraction
• Closer to end-user
History of Python
1980-Conception
1989-Implementation
2000-Python 2.0 Release
2008-Python 3.0 Release
2017-Python 2.7 to Go Transcompiler
1991-OfficiallyReleased
2020-End of life: Python 2.7
Guido Van Rossum
Frameworks for Python
Flavours of Python
Flavors of Python refers to the different types of Python compilers. These flavors
are useful to integrate various programming language into Python.
• CPython: Python -> C language
• Jython: Python -> Java language
• IronPython: Python -> C# (.NET framework)
• PyPy: Python -> Python
• RubyPython: Python -> Ruby
Data Type
It is a characteristics that tells the Compiler how a programmer intends
to use the data
Booleans are either True or False.
Numbers can be integers, floats, fractions, or complex numbers.
Strings are sequence of Unicode characters.
Bytes and byte arrays, e.g. JPEG image file .
Lists are ordered sequence.
Tuples are ordered, immutable sequence of values.
Sets are unordered bags of values.
Variable
Ex: Counter = 100 # An Integer
point name = “John” # A String
Variables are reserved memory locations to store values.
String
It is a collection of letters, or sequence of characters.
String operations:
• “hello”+ “world” “helloworld” #concatenation
• “hello”*3 “hellohellohello” #repetition
• “hello”[0] “h” #indexing
• “hello”[-1] “o” # from end
Operators
• Add two operands or unary plus +
• Subtract or unary minus -
• Multiply two operands *
• Division operator /
• Modulus - remainder of the division %
• Floor division- division that results into
whole number
• Exponent **
//
Tuple
s
Tuples are used to store multiple items in a single variable. A tuples is a
collection of immutable Python objects
Tuple Functions:
• Compares elements of both tuples cmp(tuple1, tuple2)
2. Gives the totoal length of the tuple len(tuple)
3. Returns item from the tuple with max value max(tuple)
4. Returns item from the tuple with min value min(tuple)
5. Converts a list into tuple tuple(seq)
Lists
Lists are one of 4 built in data type in Python used to collection of
data.
List item are ordered, changeable, and allow duplicate values.
Built-in List Function and Methods:
4. Returns the lowest index in list that obj appears list.index(obj)
1. Compares elements of bothe lists. cmp(list1, list2)
2. Gives the total length of the list. len(list)
5. Appends objects obj to list list.append(obj)
3. Returns item from the list with max value max(list)
6. Sorts objects of list, use compare function of given list.sort(func)
Why Python?
• Python works on different platforms ( Windows,Mac, Linux, Raspberry
Pi etc).
• Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.
Java
public class SwapNumbers {
public static void main(String[] args) {
float first = 12.0f, second = 24.5f;
System.out.println("--Before swap--");
System.out.println("First number = " +
first);
System.out.println("Second number = " +
second);
first = first - second;
second = first + second;
first = second - first;
System.out.println("--After swap--");
System.out.println("First number = " +
first);
System.out.println("Second number = " +
second);
}
}
C++
#include <iostream>
using namespace std;
int main(){
int a = 5, b = 10, temp;
cout << "Before swapping." << endl;
cout << "a = " << a << ", b = " << b << endl;
temp = a;
a = b;
b = temp;
cout << "nAfter swapping." << endl;
cout << "a = " << a << ", b = " << b << endl;
return 0;
}
Pytho
n
x = 5
y = 10
x, y = y, x
print("x =", x)
print("y =", y)
Swapping of two numbers
Introduction to Python Programming .pptx

More Related Content

Similar to Introduction to Python Programming .pptx

Similar to Introduction to Python Programming .pptx (20)

Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
01-Python-Basics.ppt
01-Python-Basics.ppt01-Python-Basics.ppt
01-Python-Basics.ppt
 
1. python programming
1. python programming1. python programming
1. python programming
 
Python
PythonPython
Python
 
Pythonppt28 11-18
Pythonppt28 11-18Pythonppt28 11-18
Pythonppt28 11-18
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
 
INTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptxINTRODUCTION TO PYTHON.pptx
INTRODUCTION TO PYTHON.pptx
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. tx
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
ENGLISH PYTHON.ppt
ENGLISH PYTHON.pptENGLISH PYTHON.ppt
ENGLISH PYTHON.ppt
 
Lecture1_cis4930.pdf
Lecture1_cis4930.pdfLecture1_cis4930.pdf
Lecture1_cis4930.pdf
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 
Python Basics
Python BasicsPython Basics
Python Basics
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 
Lenguaje Python
Lenguaje PythonLenguaje Python
Lenguaje Python
 
pysdasdasdsadsadsadsadsadsadasdasdthon1.ppt
pysdasdasdsadsadsadsadsadsadasdasdthon1.pptpysdasdasdsadsadsadsadsadsadasdasdthon1.ppt
pysdasdasdsadsadsadsadsadsadasdasdthon1.ppt
 
coolstuff.ppt
coolstuff.pptcoolstuff.ppt
coolstuff.ppt
 
python1.ppt
python1.pptpython1.ppt
python1.ppt
 
Introductio_to_python_progamming_ppt.ppt
Introductio_to_python_progamming_ppt.pptIntroductio_to_python_progamming_ppt.ppt
Introductio_to_python_progamming_ppt.ppt
 

Recently uploaded

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 

Introduction to Python Programming .pptx

  • 1. PYTHON Information available in audio. PRESENTED TO PRESENTED BY Introduction to Python
  • 2. Agenda • What is Python? • History of Python • Frameworks for Python • Flavors of Python • Why Python • Data Types and Variables • String • Tuple • Lists
  • 3. What is Python An interpreted, high-level programming language for general-purpose programming • Platform independent • Dynamic typing • Automatic memory management • Adding or changing functions at runtime • may use elements of natural language • Strong abstraction • Closer to end-user
  • 4. History of Python 1980-Conception 1989-Implementation 2000-Python 2.0 Release 2008-Python 3.0 Release 2017-Python 2.7 to Go Transcompiler 1991-OfficiallyReleased 2020-End of life: Python 2.7 Guido Van Rossum
  • 6. Flavours of Python Flavors of Python refers to the different types of Python compilers. These flavors are useful to integrate various programming language into Python. • CPython: Python -> C language • Jython: Python -> Java language • IronPython: Python -> C# (.NET framework) • PyPy: Python -> Python • RubyPython: Python -> Ruby
  • 7. Data Type It is a characteristics that tells the Compiler how a programmer intends to use the data Booleans are either True or False. Numbers can be integers, floats, fractions, or complex numbers. Strings are sequence of Unicode characters. Bytes and byte arrays, e.g. JPEG image file . Lists are ordered sequence. Tuples are ordered, immutable sequence of values. Sets are unordered bags of values.
  • 8. Variable Ex: Counter = 100 # An Integer point name = “John” # A String Variables are reserved memory locations to store values. String It is a collection of letters, or sequence of characters. String operations: • “hello”+ “world” “helloworld” #concatenation • “hello”*3 “hellohellohello” #repetition • “hello”[0] “h” #indexing • “hello”[-1] “o” # from end
  • 9. Operators • Add two operands or unary plus + • Subtract or unary minus - • Multiply two operands * • Division operator / • Modulus - remainder of the division % • Floor division- division that results into whole number • Exponent ** //
  • 10. Tuple s Tuples are used to store multiple items in a single variable. A tuples is a collection of immutable Python objects Tuple Functions: • Compares elements of both tuples cmp(tuple1, tuple2) 2. Gives the totoal length of the tuple len(tuple) 3. Returns item from the tuple with max value max(tuple) 4. Returns item from the tuple with min value min(tuple) 5. Converts a list into tuple tuple(seq)
  • 11. Lists Lists are one of 4 built in data type in Python used to collection of data. List item are ordered, changeable, and allow duplicate values. Built-in List Function and Methods: 4. Returns the lowest index in list that obj appears list.index(obj) 1. Compares elements of bothe lists. cmp(list1, list2) 2. Gives the total length of the list. len(list) 5. Appends objects obj to list list.append(obj) 3. Returns item from the list with max value max(list) 6. Sorts objects of list, use compare function of given list.sort(func)
  • 12. Why Python? • Python works on different platforms ( Windows,Mac, Linux, Raspberry Pi etc). • Python has syntax that allows developers to write programs with fewer lines than some other programming languages. Java public class SwapNumbers { public static void main(String[] args) { float first = 12.0f, second = 24.5f; System.out.println("--Before swap--"); System.out.println("First number = " + first); System.out.println("Second number = " + second); first = first - second; second = first + second; first = second - first; System.out.println("--After swap--"); System.out.println("First number = " + first); System.out.println("Second number = " + second); } } C++ #include <iostream> using namespace std; int main(){ int a = 5, b = 10, temp; cout << "Before swapping." << endl; cout << "a = " << a << ", b = " << b << endl; temp = a; a = b; b = temp; cout << "nAfter swapping." << endl; cout << "a = " << a << ", b = " << b << endl; return 0; } Pytho n x = 5 y = 10 x, y = y, x print("x =", x) print("y =", y) Swapping of two numbers