SlideShare a Scribd company logo
1 of 16
Python and You By Karthik Prakash
[object Object]
 Interactive “Shell”
 Basic Types and Containers
 Control StructuresSession 1
“Remarkable power with very clear syntax” Python is an Interpreted, Object Oriented Programming language. …it’s named after a television series  Monty Python’s Flying Circus It was created by Guido Van Rossum in the year 1990… What is Python ??
Features :- Free and Open Source… Maintained by the PSF (Python Software Foundation) Rapid Prototyping Compiled to interpreted byte code .. sometimes called as Scripting language ….i.e Compilation is implicit Indentation for block structure 		…“Life's better without braces(Bruce Eckel)” Extremely Portable (Windows,Linux,Unix,Mac… etc) Powerful Standard libraries
Two variations:  IDLE (GUI)  and PYTHON (command line) Most Python implementations work on CLI (Command Line Interface) Great for learning the language by experimenting with the library Great for testing your own modules  Benefits of IDLE ,[object Object]
Interactive Command Shell
Syntax Highlighting
Auto-Indentation
Auto Completion extended to IntellisenceInteractive Shell
None Numbers and Floats Complex Numbers …. (i + j) Floating point Boolean…. True or False “Strings” u“Unicode” Tuples () Lists [] Dictonaries {} Built-in Function “type()” Data Types and Containers
If, else, elif…. Try and except While Loop For Loop Conditions and Loops
List Comprehension Functions Doc Strings … Smart way of Documenting modules File Handling …… read , write , append to file Session 2
Single [ <item operation> for item in sequence <if condition>] Nested Special care has to be taken for the nested list comprehension: ….when nesting list comprehensions, read from right to left. List Comprehension

More Related Content

What's hot

What's hot (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to Python for Bioinformatics
Introduction to Python for BioinformaticsIntroduction to Python for Bioinformatics
Introduction to Python for Bioinformatics
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert Best Python Online Training with Live Project by Expert
Best Python Online Training with Live Project by Expert
 
Intro to Python for Non-Programmers
Intro to Python for Non-ProgrammersIntro to Python for Non-Programmers
Intro to Python for Non-Programmers
 
JNA
JNAJNA
JNA
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus Bulletin
 
Python Workshop
Python WorkshopPython Workshop
Python Workshop
 
Beginning Python
Beginning PythonBeginning Python
Beginning Python
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 
Introduction to Programming in Go
Introduction to Programming in GoIntroduction to Programming in Go
Introduction to Programming in Go
 
Introduction to programming with python
Introduction to programming with pythonIntroduction to programming with python
Introduction to programming with python
 
Python Intro
Python IntroPython Intro
Python Intro
 
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
Advanced Python Tutorial | Learn Advanced Python Concepts | Python Programmin...
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python - Introduction
Python - IntroductionPython - Introduction
Python - Introduction
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 

Similar to A Head Start on Python Language

Unix_commands_theory
Unix_commands_theoryUnix_commands_theory
Unix_commands_theory
Niti Patel
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
Dr.Ravi
 
Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01
Rex Joe
 

Similar to A Head Start on Python Language (20)

Python Kick Start
Python Kick StartPython Kick Start
Python Kick Start
 
Python-files
Python-filesPython-files
Python-files
 
Python for Linux System Administration
Python for Linux System AdministrationPython for Linux System Administration
Python for Linux System Administration
 
Module2-Files.pdf
Module2-Files.pdfModule2-Files.pdf
Module2-Files.pdf
 
From Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndromeFrom Java to Python: beating the Stockholm syndrome
From Java to Python: beating the Stockholm syndrome
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
Dynamic Python
Dynamic PythonDynamic Python
Dynamic Python
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
Files in Python.pptx
Files in Python.pptxFiles in Python.pptx
Files in Python.pptx
 
Linux Basics
Linux BasicsLinux Basics
Linux Basics
 
Python_intro.ppt
Python_intro.pptPython_intro.ppt
Python_intro.ppt
 
Unix tutorial-08
Unix tutorial-08Unix tutorial-08
Unix tutorial-08
 
Unix_commands_theory
Unix_commands_theoryUnix_commands_theory
Unix_commands_theory
 
Unix Basics
Unix BasicsUnix Basics
Unix Basics
 
Wildcards, Simple Shell Programs and Shell Variables
Wildcards, Simple Shell Programs and Shell VariablesWildcards, Simple Shell Programs and Shell Variables
Wildcards, Simple Shell Programs and Shell Variables
 
COM1407: File Processing
COM1407: File Processing COM1407: File Processing
COM1407: File Processing
 
Files in c++
Files in c++Files in c++
Files in c++
 
Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01Filesinc 130512002619-phpapp01
Filesinc 130512002619-phpapp01
 
Python1
Python1Python1
Python1
 
Linux introduction-commands2338
Linux introduction-commands2338Linux introduction-commands2338
Linux introduction-commands2338
 

Recently uploaded

Recently uploaded (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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...
 

A Head Start on Python Language

  • 1. Python and You By Karthik Prakash
  • 2.
  • 4. Basic Types and Containers
  • 6. “Remarkable power with very clear syntax” Python is an Interpreted, Object Oriented Programming language. …it’s named after a television series Monty Python’s Flying Circus It was created by Guido Van Rossum in the year 1990… What is Python ??
  • 7. Features :- Free and Open Source… Maintained by the PSF (Python Software Foundation) Rapid Prototyping Compiled to interpreted byte code .. sometimes called as Scripting language ….i.e Compilation is implicit Indentation for block structure …“Life's better without braces(Bruce Eckel)” Extremely Portable (Windows,Linux,Unix,Mac… etc) Powerful Standard libraries
  • 8.
  • 12. Auto Completion extended to IntellisenceInteractive Shell
  • 13. None Numbers and Floats Complex Numbers …. (i + j) Floating point Boolean…. True or False “Strings” u“Unicode” Tuples () Lists [] Dictonaries {} Built-in Function “type()” Data Types and Containers
  • 14. If, else, elif…. Try and except While Loop For Loop Conditions and Loops
  • 15. List Comprehension Functions Doc Strings … Smart way of Documenting modules File Handling …… read , write , append to file Session 2
  • 16. Single [ <item operation> for item in sequence <if condition>] Nested Special care has to be taken for the nested list comprehension: ….when nesting list comprehensions, read from right to left. List Comprehension
  • 17. Function Definition :- def name (arg1, arg2…. , argn) “““ Documentation ””” #optional statements . . . return expression name(arg1,arg2) # Call to <name> Functions
  • 18. File Modes Mode Meaning 'r' open for reading (default) 'w' open for writing, truncating the file first 'a' open for writing, appending to the end of the file if it exists 'b' binary mode File Handling
  • 19. f = open(filename, [mode]) read(), readline(), readlines() write(), writelines() seek(pos), tell() close() File Objects and Methods
  • 20. Session 3 Classes Class Definition Class Objects Class Data members Class Methods Class Inheritance
  • 21. Class Definition class Stack: "A well-known data structure…" def __init__(self): # constructor self.items = [] def push(self, x): self.items.append(x) #. Push into the Stack…the sky is the limit def pop(self): x = self.items[-1] # Pop from the stack del self.items[-1] return x def empty(self): return len(self.items) == 0 # Boolean result
  • 22. Class Objects , Methods and Data Members object = Stack() #--- Object of the Class “Stack” ….. Constructor invoked during Object instantiation object.push(arg1) #---- Call to Class Method “push” print object.items #---- Access the Class Data Member
  • 23. Inheritance class BaseClass: baseDataVar = 10 def baseMethods(self) statements class DerivedClass(BaseClass): def Method() print self.baseDataVar self.baseMethods() #-- Call to base class method