SlideShare a Scribd company logo
1 of 26
Python Programming
UNIT 1 : SYLLABUS
• Conceptual introduction: topics in computer science, algorithms;
• Modern computer systems: hardware architecture, data
representation in computers, software and operating system;
• Installing Python; basic syntax, interactive shell, editing, saving, and
running a script.
• The concept of data types; variables, assignments; immutable
variables; numerical types;
• arithmetic operators and expressions; comments in the program;
understanding error messages;
Guido Van Rossum published the
first version of Python code
(Python 0.9.0) in February 1991.
This release included exception
handling, functions and the core
data types.
Python 1.0 released in
January 1994. It included
filters, map, reduce and
lambda
Python 2.0 released in October
2000. Features include list
comprehension and garbage
collection with reference cycles
Python 3.0 released in December
2008. Removed duplicate
constructs and modules. Not
backward compatible.
1
2
3
4
5
6
FREE AND OPEN SOURCE
The standard modules and
the Python interpreter are
free.
PORTABLE
Python interpreter exists for
almost all platforms/operating
systems.
SIMPLE & EASY TO LEARN
Python has a very simple
syntax; it means it is very
easy to learn and code.
EXTENSIVE
LIBRARIES
The Python Standard
Library is very exhaustive
library
EXTENSIBLE
&EMBEDDABLE
One can embed Python
within a C or C++
program.
OBJECT ORIENTED
Python supports object-
oriented programming
Features of
Python
Basic syntax &
Interactive shell
Editing, Saving, and
Running a script.
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Installing Python
Basic syntax &
Interactive shell
Editing, Saving, and
Running a script.
Installing Python
Basic syntax & Interactive shell
The instructions written
in Python programming language can be
executed in two modes:
• Interactive mode
• Normal or Script mode
Interactive mode:
In this mode, lines of code is directly written and
executed in the Python interpreter shell, which
instantaneously provide the results.
Normal or Script mode:
In this mode the source code is saved to a file
with .py extension, and the file is executed
by the Python interpreter.
A shell window contains an opening message
followed by the special symbol >>>, called a shell
prompt.
Basic syntax & Interactive shell
Basic syntax & Interactive shell
Basic syntax & Interactive shell
The programmer can also display the output
of a value by using the print function.
print(<expression>)
To begin the next output on the same line as the
previous one, you can place the expression end = “
”
>>> print("Python" , end = ' ')
>>> print(“Programming")
write a print function that includes two or
more expressions separated by commas.
In such a case, the print function evaluates
the expressions and displays the results,
separated by single spaces, on one line.
print(<expression>,..., <expression>)
>>> print ("Hi there")
Hi there
>>> print(3+4,8-5,"hello")
7 3 hello
Basic syntax & Interactive shell
Programs to ask the user for input. You can
do this by using the input function.
>>> name = input("Enter your name: ")
Enter your name: RISE Group
>>> name
' RISE Group '
>>> print(name)
Ken Lambert
The input function does the following:
1. Displays a prompt for the input. In this
example, the prompt is "Enter your name: ".
2. Receives a string of keystrokes, called
characters, entered at the keyboard and
returns the string to the shell.
This function causes the program to stop and
wait for the user to enter a value from the
keyboard.
Basic syntax & Interactive shell
• The input function always builds a string
from the user’s keystrokes and returns it
to the program.
• After inputting strings that represent
numbers, the programmer must convert
them from strings to the appropriate
numeric types.
• In Python, there are two type conversion
functions for this purpose, called int (for
integers) and float (for floating point
numbers).
>>> first = int(input("Enter the first number:
"))
Enter the first number: 23
>>> second = int(input("Enter the second
number: "))
Enter the second number: 44
>>> print("The sum is", first + second)
The sum is 67
Basic syntax &
Interactive shell
Editing, Saving, and
Running a script.
Installing Python
Editing, Saving, and Running a script.
• It is more convenient to
compose, edit, and save longer,
more complex programs in
files.
• We can then run these program
files or scripts either within
IDLE or from the operating
system’s command prompt
without opening IDLE.
Perform the following steps:
1. Select the option New Window from the File
menu of the shell window.
2. In the new window, enter Python expressions or
statements on separate lines, in the order in which
you want Python to execute them.
3. At any point, you may save the file by selecting
File/Save. If you do this, you should use a . py
extension. For example, your first program file
might be named myprogram.py.
4. To run this file of code as a Python script, select
Run Module from the Run menu or press the F5 key.
Basic syntax &
Interactive shell
Editing, Saving, and
Running a script.
Installing Python
UNIT 1 : SYLLABUS
• Conceptual introduction: topics in computer science, algorithms;
• Modern computer systems: hardware architecture, data
representation in computers, software and operating system;
• Installing Python; basic syntax, interactive shell, editing, saving, and
running a script.
• The concept of data types; variables, assignments; immutable
variables; numerical types;
• arithmetic operators and expressions; comments in the program;
understanding error messages;

More Related Content

What's hot

Computer Architecture
Computer ArchitectureComputer Architecture
Computer ArchitectureLouise Magno
 
Chapt 01 Assembly Language
Chapt 01 Assembly LanguageChapt 01 Assembly Language
Chapt 01 Assembly LanguageHamza Akram
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahniHitesh Wagle
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsAkhil Kaushik
 
It tools and buisness system.docx
It tools and buisness system.docxIt tools and buisness system.docx
It tools and buisness system.docxhinditutorialspoint
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1warda aziz
 
Computer architecture
Computer architectureComputer architecture
Computer architectureMrsNunn
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computerKamal Acharya
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Languagefasihuddin90
 
Process of algorithm evaluation
Process of algorithm evaluationProcess of algorithm evaluation
Process of algorithm evaluationAshish Ranjan
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Khaja Dileef
 
PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONJoland Reambillo
 

What's hot (20)

Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Machine language
Machine languageMachine language
Machine language
 
INSTRUCTION SET
INSTRUCTION SETINSTRUCTION SET
INSTRUCTION SET
 
Chapt 01 Assembly Language
Chapt 01 Assembly LanguageChapt 01 Assembly Language
Chapt 01 Assembly Language
 
Fundamentals of data structures ellis horowitz & sartaj sahni
Fundamentals of data structures   ellis horowitz & sartaj sahniFundamentals of data structures   ellis horowitz & sartaj sahni
Fundamentals of data structures ellis horowitz & sartaj sahni
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
It tools and buisness system.docx
It tools and buisness system.docxIt tools and buisness system.docx
It tools and buisness system.docx
 
Highlevel assemly
Highlevel assemlyHighlevel assemly
Highlevel assemly
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 
Computer Organization and Assembly Language
Computer Organization and Assembly LanguageComputer Organization and Assembly Language
Computer Organization and Assembly Language
 
Assembly language
Assembly languageAssembly language
Assembly language
 
Process of algorithm evaluation
Process of algorithm evaluationProcess of algorithm evaluation
Process of algorithm evaluation
 
Intro to assembly language
Intro to assembly languageIntro to assembly language
Intro to assembly language
 
Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2Systemsoftwarenotes 100929171256-phpapp02 2
Systemsoftwarenotes 100929171256-phpapp02 2
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Dsp Datapath
Dsp DatapathDsp Datapath
Dsp Datapath
 
PROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATIONPROGRAM LOGIC AND FORMULATION
PROGRAM LOGIC AND FORMULATION
 

Similar to Python Programming | JNTUK | UNIT 1 | Lecture 3

Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine LearningStudent
 
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON Nandakumar P
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptxpcjoshi02
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of pythonBijuAugustian
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python ProgrammingDozie Agbo
 
Chapter01_Python.ppt
Chapter01_Python.pptChapter01_Python.ppt
Chapter01_Python.pptPigPug1
 
PythonNotes1.pdf
PythonNotes1.pdfPythonNotes1.pdf
PythonNotes1.pdfShaikfiza5
 
python presentation
python presentationpython presentation
python presentationVaibhavMawal
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonmckennadglyn
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxusvirat1805
 

Similar to Python Programming | JNTUK | UNIT 1 | Lecture 3 (20)

PYTHON PROGRAMMING NOTES RKREDDY.pdf
PYTHON PROGRAMMING NOTES RKREDDY.pdfPYTHON PROGRAMMING NOTES RKREDDY.pdf
PYTHON PROGRAMMING NOTES RKREDDY.pdf
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Learn python
Learn pythonLearn python
Learn python
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
Introduction to python.pptx
Introduction to python.pptxIntroduction to python.pptx
Introduction to python.pptx
 
Fundamentals of python
Fundamentals of pythonFundamentals of python
Fundamentals of python
 
First Steps in Python Programming
First Steps in Python ProgrammingFirst Steps in Python Programming
First Steps in Python Programming
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
Spsl iv unit final
Spsl iv unit  finalSpsl iv unit  final
Spsl iv unit final
 
Spsl iv unit final
Spsl iv unit  finalSpsl iv unit  final
Spsl iv unit final
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Chapter01_Python.ppt
Chapter01_Python.pptChapter01_Python.ppt
Chapter01_Python.ppt
 
PythonNotes1.pdf
PythonNotes1.pdfPythonNotes1.pdf
PythonNotes1.pdf
 
python presentation
python presentationpython presentation
python presentation
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
unit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptxunit (1)INTRODUCTION TO PYTHON course.pptx
unit (1)INTRODUCTION TO PYTHON course.pptx
 

More from FabMinds

Python Programming | JNTUA | UNIT 3 | Lists |
Python Programming | JNTUA | UNIT 3 | Lists | Python Programming | JNTUA | UNIT 3 | Lists |
Python Programming | JNTUA | UNIT 3 | Lists | FabMinds
 
Python Programming | JNTUA | UNIT 3 | Strings |
Python Programming | JNTUA | UNIT 3 | Strings | Python Programming | JNTUA | UNIT 3 | Strings |
Python Programming | JNTUA | UNIT 3 | Strings | FabMinds
 
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration | Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration | FabMinds
 
Python Programming | JNTUA | UNIT 2 | Case Study |
Python Programming | JNTUA | UNIT 2 | Case Study | Python Programming | JNTUA | UNIT 2 | Case Study |
Python Programming | JNTUA | UNIT 2 | Case Study | FabMinds
 
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions | Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions | FabMinds
 
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion | Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion | FabMinds
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocolsFabMinds
 
Internet connectivity
Internet connectivityInternet connectivity
Internet connectivityFabMinds
 
Introduction for internet connectivity (IoT)
 Introduction for internet connectivity (IoT) Introduction for internet connectivity (IoT)
Introduction for internet connectivity (IoT)FabMinds
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoTFabMinds
 
message communication protocols in IoT
message communication protocols in IoTmessage communication protocols in IoT
message communication protocols in IoTFabMinds
 
web communication protocols in IoT
web communication protocols in IoTweb communication protocols in IoT
web communication protocols in IoTFabMinds
 
introduction for web connectivity (IoT)
introduction for web connectivity (IoT)introduction for web connectivity (IoT)
introduction for web connectivity (IoT)FabMinds
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsPython Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsFabMinds
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsPython Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsFabMinds
 
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...FabMinds
 
Data enrichment
Data enrichmentData enrichment
Data enrichmentFabMinds
 
Communication technologies
Communication technologiesCommunication technologies
Communication technologiesFabMinds
 
M2M systems layers and designs standardizations
M2M systems layers and designs standardizationsM2M systems layers and designs standardizations
M2M systems layers and designs standardizationsFabMinds
 
Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoTFabMinds
 

More from FabMinds (20)

Python Programming | JNTUA | UNIT 3 | Lists |
Python Programming | JNTUA | UNIT 3 | Lists | Python Programming | JNTUA | UNIT 3 | Lists |
Python Programming | JNTUA | UNIT 3 | Lists |
 
Python Programming | JNTUA | UNIT 3 | Strings |
Python Programming | JNTUA | UNIT 3 | Strings | Python Programming | JNTUA | UNIT 3 | Strings |
Python Programming | JNTUA | UNIT 3 | Strings |
 
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration | Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
Python Programming | JNTUA | UNIT 3 | Updating Variables & Iteration |
 
Python Programming | JNTUA | UNIT 2 | Case Study |
Python Programming | JNTUA | UNIT 2 | Case Study | Python Programming | JNTUA | UNIT 2 | Case Study |
Python Programming | JNTUA | UNIT 2 | Case Study |
 
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions | Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
Python Programming | JNTUA | UNIT 2 | Fruitful Functions |
 
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion | Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
Python Programming | JNTUA | UNIT 2 | Conditionals and Recursion |
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Internet connectivity
Internet connectivityInternet connectivity
Internet connectivity
 
Introduction for internet connectivity (IoT)
 Introduction for internet connectivity (IoT) Introduction for internet connectivity (IoT)
Introduction for internet connectivity (IoT)
 
web connectivity in IoT
web connectivity in IoTweb connectivity in IoT
web connectivity in IoT
 
message communication protocols in IoT
message communication protocols in IoTmessage communication protocols in IoT
message communication protocols in IoT
 
web communication protocols in IoT
web communication protocols in IoTweb communication protocols in IoT
web communication protocols in IoT
 
introduction for web connectivity (IoT)
introduction for web connectivity (IoT)introduction for web connectivity (IoT)
introduction for web connectivity (IoT)
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsPython Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
 
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | FunctionsPython Introduction | JNTUA | R19 | UNIT 1 | Functions
Python Introduction | JNTUA | R19 | UNIT 1 | Functions
 
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
Python Programming | JNTUK | UNIT 2 | Lecture 6 & 7 | Conditional & Control S...
 
Data enrichment
Data enrichmentData enrichment
Data enrichment
 
Communication technologies
Communication technologiesCommunication technologies
Communication technologies
 
M2M systems layers and designs standardizations
M2M systems layers and designs standardizationsM2M systems layers and designs standardizations
M2M systems layers and designs standardizations
 
Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoT
 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
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
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
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...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
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
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 

Python Programming | JNTUK | UNIT 1 | Lecture 3

  • 2. UNIT 1 : SYLLABUS • Conceptual introduction: topics in computer science, algorithms; • Modern computer systems: hardware architecture, data representation in computers, software and operating system; • Installing Python; basic syntax, interactive shell, editing, saving, and running a script. • The concept of data types; variables, assignments; immutable variables; numerical types; • arithmetic operators and expressions; comments in the program; understanding error messages;
  • 3. Guido Van Rossum published the first version of Python code (Python 0.9.0) in February 1991. This release included exception handling, functions and the core data types. Python 1.0 released in January 1994. It included filters, map, reduce and lambda Python 2.0 released in October 2000. Features include list comprehension and garbage collection with reference cycles
  • 4. Python 3.0 released in December 2008. Removed duplicate constructs and modules. Not backward compatible.
  • 5. 1 2 3 4 5 6 FREE AND OPEN SOURCE The standard modules and the Python interpreter are free. PORTABLE Python interpreter exists for almost all platforms/operating systems. SIMPLE & EASY TO LEARN Python has a very simple syntax; it means it is very easy to learn and code. EXTENSIVE LIBRARIES The Python Standard Library is very exhaustive library EXTENSIBLE &EMBEDDABLE One can embed Python within a C or C++ program. OBJECT ORIENTED Python supports object- oriented programming Features of Python
  • 6. Basic syntax & Interactive shell Editing, Saving, and Running a script. Installing Python
  • 16. Basic syntax & Interactive shell Editing, Saving, and Running a script. Installing Python
  • 17. Basic syntax & Interactive shell The instructions written in Python programming language can be executed in two modes: • Interactive mode • Normal or Script mode Interactive mode: In this mode, lines of code is directly written and executed in the Python interpreter shell, which instantaneously provide the results. Normal or Script mode: In this mode the source code is saved to a file with .py extension, and the file is executed by the Python interpreter. A shell window contains an opening message followed by the special symbol >>>, called a shell prompt.
  • 18. Basic syntax & Interactive shell
  • 19. Basic syntax & Interactive shell
  • 20. Basic syntax & Interactive shell The programmer can also display the output of a value by using the print function. print(<expression>) To begin the next output on the same line as the previous one, you can place the expression end = “ ” >>> print("Python" , end = ' ') >>> print(“Programming") write a print function that includes two or more expressions separated by commas. In such a case, the print function evaluates the expressions and displays the results, separated by single spaces, on one line. print(<expression>,..., <expression>) >>> print ("Hi there") Hi there >>> print(3+4,8-5,"hello") 7 3 hello
  • 21. Basic syntax & Interactive shell Programs to ask the user for input. You can do this by using the input function. >>> name = input("Enter your name: ") Enter your name: RISE Group >>> name ' RISE Group ' >>> print(name) Ken Lambert The input function does the following: 1. Displays a prompt for the input. In this example, the prompt is "Enter your name: ". 2. Receives a string of keystrokes, called characters, entered at the keyboard and returns the string to the shell. This function causes the program to stop and wait for the user to enter a value from the keyboard.
  • 22. Basic syntax & Interactive shell • The input function always builds a string from the user’s keystrokes and returns it to the program. • After inputting strings that represent numbers, the programmer must convert them from strings to the appropriate numeric types. • In Python, there are two type conversion functions for this purpose, called int (for integers) and float (for floating point numbers). >>> first = int(input("Enter the first number: ")) Enter the first number: 23 >>> second = int(input("Enter the second number: ")) Enter the second number: 44 >>> print("The sum is", first + second) The sum is 67
  • 23. Basic syntax & Interactive shell Editing, Saving, and Running a script. Installing Python
  • 24. Editing, Saving, and Running a script. • It is more convenient to compose, edit, and save longer, more complex programs in files. • We can then run these program files or scripts either within IDLE or from the operating system’s command prompt without opening IDLE. Perform the following steps: 1. Select the option New Window from the File menu of the shell window. 2. In the new window, enter Python expressions or statements on separate lines, in the order in which you want Python to execute them. 3. At any point, you may save the file by selecting File/Save. If you do this, you should use a . py extension. For example, your first program file might be named myprogram.py. 4. To run this file of code as a Python script, select Run Module from the Run menu or press the F5 key.
  • 25. Basic syntax & Interactive shell Editing, Saving, and Running a script. Installing Python
  • 26. UNIT 1 : SYLLABUS • Conceptual introduction: topics in computer science, algorithms; • Modern computer systems: hardware architecture, data representation in computers, software and operating system; • Installing Python; basic syntax, interactive shell, editing, saving, and running a script. • The concept of data types; variables, assignments; immutable variables; numerical types; • arithmetic operators and expressions; comments in the program; understanding error messages;