SlideShare a Scribd company logo
Python Programming
(for Beginners)
Ms.P.Sundari, M.Sc.,M.Phil.,SET
Assistant Professor,
Dept.of Computer Science,
National College(Autonomous),Trichy
Introduction to Python
• Python is an interpreted high-level programming language for general
purpose programming that employs an object oriented approach. It can
model real-world entities. It is also dynamically typed because it carries
out type-checking at runtime. Python IDLE (Integrated Development
Environment) executes instructions one line at a time allows to use as a
calculator.
• It is used by many of the most highly productive professional
programmers. Python is used for software development at companies and
organizations such as Google, Yahoo, CERN, Industrial Light and Magic, and
NASA. Python is often used as the scripting language for video games.
Guido Van Rossum
Integrated Development Environment(IDLE)
• We can run simple Python expression and statements in an
interactive programming environment called the shell. The easiest
way to open a Python shell is to launch IDLE.
• This is an integrated program development environment that comes
with the Python installation.
To get the IDLE: start -> All Programs -> IDLE from Python.
• It displays the Python shell window:
• The symbol ‘>>>’ called a shell prompt which indicates that the
interpreter is ready and waits for user to enter a Python
command. Short cut keys Purpose
Ctrl+c Copy the selected text
Ctrl+x Cut the selected text
Ctrl+v Paste
Ctrl+z Undo the last key strokes
Ctrl+shift+z Redo the last key strokes
F5 Run the Module
Ctrl+D / ctrl+Q To come out from the Python
• IDLE allows the programmer to save programs in files and load them into a
shell for testing.
• Steps:
1. Select the option New File from File menu on the shell window.
2. In the new window, enter the Python expression or statements and save the
file by selecting File->Save. Use a ‘.py’ extension.
3. To run this file, select ‘Run Module’ or F5 from the ‘Run’ Menu.
Compilation Process of Python program:
• Python first compiles the source code (.py) into a format known as byte
code. Compiled code is usually stored in .pyc files and is regenerated when the
source code is updated or when otherwise necessary.
• The bytecode (.pyc file) is loaded into the python runtime and
interpreted by a Python Virtual Machine.
• Each time an interpreted program is run, the interpreter must convert
source code into machine code and also pull in the runtime libraries. It compiles
to bytecode the first time it executes a file.
Simple Calculator
SORT NUMBERS IN ASCENDING ORDER
MATRIX MANIPULATION
OUTPUT
Python Programming for Beginners
Python Programming for Beginners
Python Programming for Beginners

More Related Content

What's hot

Python basic
Python basicPython basic
Python basic
radhikaadroja
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
Pro Guide
 
Python programming
Python programmingPython programming
Python programming
Megha V
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
First python project
First python projectFirst python project
First python project
Neetu Jain
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
Boey Pak Cheong
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
 
Python Usefulness
Python UsefulnessPython Usefulness
Python Usefulness
Vipul Petkar
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
DrMohammed Qassim
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
GLC Networks
 
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
Praveen M Jigajinni
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
ManishJha237
 
Python for Android
Python for AndroidPython for Android
Python for Androidphlax
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
paradisetechsoftsolutions
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
Biswajeet Dasmajumdar
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
SANTOSHJAISWAL52
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
Sankhya_Analytics
 
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
Shivam Gupta
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
Praveen M Jigajinni
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
kshitij chaurasiya
 

What's hot (20)

Python basic
Python basicPython basic
Python basic
 
Introduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of PythonIntroduction to python programming, Why Python?, Applications of Python
Introduction to python programming, Why Python?, Applications of Python
 
Python programming
Python programmingPython programming
Python programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
First python project
First python projectFirst python project
First python project
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python Usefulness
Python UsefulnessPython Usefulness
Python Usefulness
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
11 Unit1 Chapter 1 Getting Started With Python
11   Unit1 Chapter 1 Getting Started With Python11   Unit1 Chapter 1 Getting Started With Python
11 Unit1 Chapter 1 Getting Started With Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python for Android
Python for AndroidPython for Android
Python for Android
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 

Similar to Python Programming for Beginners

Module1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxModule1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptx
SandeepR95
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
anaveenkumar4
 
Introduction python
Introduction pythonIntroduction python
Introduction python
Jumbo Techno e_Learning
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Niraj Bharambe
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
Ramakrishna Reddy Bijjam
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
Beginning python programming
Beginning python programmingBeginning python programming
Beginning python programming
kanteshraj
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
Lovely professinal university
 
Python PPT1.pdf
Python PPT1.pdfPython PPT1.pdf
Python PPT1.pdf
DrSSelvakanmaniAssoc
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
Mohd Sajjad
 
Python programming
Python programmingPython programming
Python programming
Prof. Dr. K. Adisesha
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
lemonchoos
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
VisionAcademyProfSac
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
SugumarSarDurai
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
sharanyarashmir5
 

Similar to Python Programming for Beginners (20)

Module1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxModule1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptx
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
Beginning python programming
Beginning python programmingBeginning python programming
Beginning python programming
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
 
Python PPT1.pdf
Python PPT1.pdfPython PPT1.pdf
Python PPT1.pdf
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Python programming
Python programmingPython programming
Python programming
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
 
Pythonpresent
PythonpresentPythonpresent
Pythonpresent
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Python Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computerPython Programming-1.pptx of python by computer
Python Programming-1.pptx of python by computer
 
Python
Python Python
Python
 

More from P. SUNDARI ARUN

Material related to ICT
Material related to ICTMaterial related to ICT
Material related to ICT
P. SUNDARI ARUN
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
P. SUNDARI ARUN
 
MS-Excel Working with Pivot Table
MS-Excel Working with Pivot TableMS-Excel Working with Pivot Table
MS-Excel Working with Pivot Table
P. SUNDARI ARUN
 
MS-Excel Formulas and Functions
MS-Excel Formulas and FunctionsMS-Excel Formulas and Functions
MS-Excel Formulas and Functions
P. SUNDARI ARUN
 
Advanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-ExcelAdvanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-Excel
P. SUNDARI ARUN
 
VBA in MS-Excel
VBA in MS-Excel VBA in MS-Excel
VBA in MS-Excel
P. SUNDARI ARUN
 

More from P. SUNDARI ARUN (6)

Material related to ICT
Material related to ICTMaterial related to ICT
Material related to ICT
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
MS-Excel Working with Pivot Table
MS-Excel Working with Pivot TableMS-Excel Working with Pivot Table
MS-Excel Working with Pivot Table
 
MS-Excel Formulas and Functions
MS-Excel Formulas and FunctionsMS-Excel Formulas and Functions
MS-Excel Formulas and Functions
 
Advanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-ExcelAdvanced Filter Concepts in MS-Excel
Advanced Filter Concepts in MS-Excel
 
VBA in MS-Excel
VBA in MS-Excel VBA in MS-Excel
VBA in MS-Excel
 

Recently uploaded

Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 

Recently uploaded (20)

Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 

Python Programming for Beginners

  • 1. Python Programming (for Beginners) Ms.P.Sundari, M.Sc.,M.Phil.,SET Assistant Professor, Dept.of Computer Science, National College(Autonomous),Trichy
  • 2. Introduction to Python • Python is an interpreted high-level programming language for general purpose programming that employs an object oriented approach. It can model real-world entities. It is also dynamically typed because it carries out type-checking at runtime. Python IDLE (Integrated Development Environment) executes instructions one line at a time allows to use as a calculator. • It is used by many of the most highly productive professional programmers. Python is used for software development at companies and organizations such as Google, Yahoo, CERN, Industrial Light and Magic, and NASA. Python is often used as the scripting language for video games. Guido Van Rossum
  • 3. Integrated Development Environment(IDLE) • We can run simple Python expression and statements in an interactive programming environment called the shell. The easiest way to open a Python shell is to launch IDLE. • This is an integrated program development environment that comes with the Python installation. To get the IDLE: start -> All Programs -> IDLE from Python.
  • 4. • It displays the Python shell window: • The symbol ‘>>>’ called a shell prompt which indicates that the interpreter is ready and waits for user to enter a Python command. Short cut keys Purpose Ctrl+c Copy the selected text Ctrl+x Cut the selected text Ctrl+v Paste Ctrl+z Undo the last key strokes Ctrl+shift+z Redo the last key strokes F5 Run the Module Ctrl+D / ctrl+Q To come out from the Python
  • 5. • IDLE allows the programmer to save programs in files and load them into a shell for testing. • Steps: 1. Select the option New File from File menu on the shell window.
  • 6. 2. In the new window, enter the Python expression or statements and save the file by selecting File->Save. Use a ‘.py’ extension. 3. To run this file, select ‘Run Module’ or F5 from the ‘Run’ Menu. Compilation Process of Python program: • Python first compiles the source code (.py) into a format known as byte code. Compiled code is usually stored in .pyc files and is regenerated when the source code is updated or when otherwise necessary. • The bytecode (.pyc file) is loaded into the python runtime and interpreted by a Python Virtual Machine. • Each time an interpreted program is run, the interpreter must convert source code into machine code and also pull in the runtime libraries. It compiles to bytecode the first time it executes a file.
  • 7.
  • 9.
  • 10. SORT NUMBERS IN ASCENDING ORDER
  • 11.